Implement basic scene manager with ability to switch between scenes
This commit is contained in:
parent
9063b45180
commit
f9079e4823
7 changed files with 75 additions and 21 deletions
16
src/scenes/LegacyScene.ts
Normal file
16
src/scenes/LegacyScene.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { mp5 } from '../../main';
|
||||
import { SceneManager } from './SceneManager';
|
||||
import { Scenes } from './scenes';
|
||||
|
||||
export class LegacyScene {
|
||||
constructor() {}
|
||||
|
||||
draw() {
|
||||
mp5.background(100);
|
||||
}
|
||||
|
||||
onSceneClick(sm: SceneManager) {
|
||||
console.log('Click on legacy scene');
|
||||
sm.changeSceneTo(Scenes.OVERVIEW);
|
||||
}
|
||||
}
|
||||
Reference in a new issue