Activatable objects handling WIP

This commit is contained in:
Hanusiak Piotr 2022-01-26 12:57:10 +01:00
parent 5ae039b987
commit 3af6461c01
5 changed files with 89 additions and 37 deletions

View file

@ -140,6 +140,10 @@ export abstract class Character extends Container {
}
}
public getPosition(): { x: number, y: number } {
return { x: this.x, y: this.y };
}
private async getSnapshot(): Promise<string> {
const sprites = Array.from(this.sprites.values()).map((sprite) => {
return { sprite, frame: 1 };