diff options
Diffstat (limited to 'client/src/akkamon/scenes/DemoScene.ts')
| -rw-r--r-- | client/src/akkamon/scenes/DemoScene.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/src/akkamon/scenes/DemoScene.ts b/client/src/akkamon/scenes/DemoScene.ts index 9544df3..b6b94e5 100644 --- a/client/src/akkamon/scenes/DemoScene.ts +++ b/client/src/akkamon/scenes/DemoScene.ts @@ -1,5 +1,7 @@ import Phaser from 'phaser'; +import { client } from '../../app'; + import type { BasePhaserScene } from '../PhaserTypes'; @@ -9,6 +11,14 @@ import { createWorldScene } from './WorldScene'; -let DemoScene = createWorldScene(Phaser.Scene, "DemoScene", "map", "akkamon-demo-extruded"); +function updatable<Scene extends BasePhaserScene>(scene: Scene) { + return class DemoScene extends scene { + update(time: number, delta: number) { + client.updateScene(delta); + } + } +} + +let DemoScene = updatable(createWorldScene(Phaser.Scene, "DemoScene", "map", "akkamon-demo-extruded")); export default DemoScene; |
