Help message on overview screen
This commit is contained in:
parent
95ddbcea24
commit
2cdfbe8266
3 changed files with 13 additions and 3 deletions
4
main.ts
4
main.ts
|
|
@ -39,8 +39,8 @@ const sketch = (s: p5) => {
|
||||||
const { currentScene, companionState, infoMessageShown } = store.getState();
|
const { currentScene, companionState, infoMessageShown } = store.getState();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
companionState !== CompanionState.ACTIVE ||
|
companionState !== CompanionState.ACTIVE &&
|
||||||
!infoMessageShown ||
|
!infoMessageShown &&
|
||||||
store.getState().currentIntroStep === 0
|
store.getState().currentIntroStep === 0
|
||||||
) {
|
) {
|
||||||
if (currentScene === Scenes.OVERVIEW) {
|
if (currentScene === Scenes.OVERVIEW) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import store from '../store';
|
||||||
import { generateEdges } from '../helpers';
|
import { generateEdges } from '../helpers';
|
||||||
import { Scenes } from './scenes';
|
import { Scenes } from './scenes';
|
||||||
import projectMetadata from '../../metadata/project.json';
|
import projectMetadata from '../../metadata/project.json';
|
||||||
import { playerHead$ } from '../area';
|
|
||||||
import { Area } from '../types';
|
import { Area } from '../types';
|
||||||
|
|
||||||
export class OverviewScene {
|
export class OverviewScene {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Scenes } from '../scenes/scenes';
|
||||||
import store from '../store';
|
import store from '../store';
|
||||||
|
|
||||||
export class Intro {
|
export class Intro {
|
||||||
|
|
@ -112,6 +113,16 @@ export class Intro {
|
||||||
|
|
||||||
if (currentStep === 4) {
|
if (currentStep === 4) {
|
||||||
store.setState({ currentIntroStep: 0 });
|
store.setState({ currentIntroStep: 0 });
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
if (store.getState().currentScene !== Scenes.DETAIL) {
|
||||||
|
store.getState().addUserMessage({
|
||||||
|
inputWanted: false,
|
||||||
|
text: "Hey there! Need help here? You'll have to touch the parts of the project you want to take a look at with you character's head. As soon as the project part (packages/...) is highlighted, you can click it to dive deeper into what lies behind 🔬",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 3000);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue