Merge branch 'develop' of github.com:thecodingmachine/workadventure into adminSvelte
This commit is contained in:
commit
0728d462a5
9 changed files with 177 additions and 4 deletions
|
@ -95,6 +95,8 @@ import {waScaleManager} from "../Services/WaScaleManager";
|
|||
import {peerStore} from "../../Stores/PeerStore";
|
||||
import {EmoteManager} from "./EmoteManager";
|
||||
|
||||
import AnimatedTiles from "phaser-animated-tiles";
|
||||
|
||||
export interface GameSceneInitInterface {
|
||||
initPosition: PointInterface|null,
|
||||
reconnecting: boolean
|
||||
|
@ -141,6 +143,7 @@ export class GameScene extends DirtyScene implements CenterListener {
|
|||
Layers!: Array<Phaser.Tilemaps.TilemapLayer>;
|
||||
Objects!: Array<Phaser.Physics.Arcade.Sprite>;
|
||||
mapFile!: ITiledMap;
|
||||
animatedTiles!: AnimatedTiles;
|
||||
groups: Map<number, Sprite>;
|
||||
startX!: number;
|
||||
startY!: number;
|
||||
|
@ -264,6 +267,7 @@ export class GameScene extends DirtyScene implements CenterListener {
|
|||
message: this.originalMapUrl ?? file.src
|
||||
});
|
||||
});
|
||||
this.load.scenePlugin('AnimatedTiles', AnimatedTiles, 'animatedTiles', 'animatedTiles');
|
||||
this.load.on('filecomplete-tilemapJSON-'+this.MapUrlFile, (key: string, type: string, data: unknown) => {
|
||||
this.onMapLoad(data);
|
||||
});
|
||||
|
@ -472,6 +476,9 @@ export class GameScene extends DirtyScene implements CenterListener {
|
|||
|
||||
this.initCamera();
|
||||
|
||||
this.animatedTiles.init(this.Map);
|
||||
this.events.on('tileanimationupdate', () => this.dirty = true);
|
||||
|
||||
this.initCirclesCanvas();
|
||||
|
||||
// Let's pause the scene if the connection is not established yet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue