Implement basic scene manager with ability to switch between scenes

This commit is contained in:
Dennis Schoepf 2021-07-18 14:11:38 +02:00
parent 9063b45180
commit f9079e4823
7 changed files with 75 additions and 21 deletions

16
src/scenes/LegacyScene.ts Normal file
View 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);
}
}