rewrote the app code to more easily allow for collisions
This commit is contained in:
parent
241cbd720a
commit
6e27377b07
10 changed files with 139 additions and 268 deletions
8
front/src/Phaser/Entity/Sprite.ts
Normal file
8
front/src/Phaser/Entity/Sprite.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
export class Sprite extends Phaser.GameObjects.Sprite {
|
||||
|
||||
constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: number | string) {
|
||||
super(scene, x, y, texture, frame);
|
||||
scene.sys.updateList.add(this);
|
||||
scene.sys.displayList.add(this);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue