Refactor scene management with store

This commit is contained in:
Dennis Schoepf 2021-07-18 14:41:53 +02:00
parent f9079e4823
commit 871b4116ff
10 changed files with 69 additions and 59 deletions

View file

@ -1,7 +1,6 @@
import { mp5 } from '../../main';
import { SceneManager } from './SceneManager';
import store from '../store';
import { Scenes } from './scenes';
export class LegacyScene {
constructor() {}
@ -9,8 +8,8 @@ export class LegacyScene {
mp5.background(100);
}
onSceneClick(sm: SceneManager) {
onSceneClick() {
console.log('Click on legacy scene');
sm.changeSceneTo(Scenes.OVERVIEW);
store.setState({ currentScene: Scenes.OVERVIEW });
}
}