Fix false reveal on companion click
This commit is contained in:
parent
ce11e75cf3
commit
4b26687724
2 changed files with 6 additions and 8 deletions
5
main.ts
5
main.ts
|
|
@ -36,14 +36,13 @@ const sketch = (s: p5) => {
|
|||
s.mousePressed = () => {
|
||||
const { currentScene, companionState, infoMessageShown } = store.getState();
|
||||
|
||||
if (companionState === CompanionState.ACTIVE) return;
|
||||
if (infoMessageShown) return;
|
||||
|
||||
if (companionState !== CompanionState.ACTIVE || !infoMessageShown) {
|
||||
if (currentScene === Scenes.OVERVIEW) {
|
||||
overviewScene.onSceneClick();
|
||||
} else if (currentScene === Scenes.DETAIL) {
|
||||
detailScene.onSceneClick();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { CompanionMessage, CompanionState } from './ui/companion';
|
|||
import project from '../metadata/project.json';
|
||||
import { InfoMessageType } from './ui/info';
|
||||
import { RevealableInterface, RevealableTypes } from './sketchObjects/Revealable';
|
||||
import { SubProject } from './types';
|
||||
import { getRevealablesforSubproject } from './helpers';
|
||||
|
||||
export interface State {
|
||||
|
|
|
|||
Reference in a new issue