Fix false reveal on companion click

This commit is contained in:
Dennis Schoepf 2021-08-01 09:32:31 +02:00
parent ce11e75cf3
commit 4b26687724
2 changed files with 6 additions and 8 deletions

View file

@ -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();
}
}
};
};

View file

@ -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 {