front: add AnimatedTiles plugin
This commit is contained in:
parent
c2d0cda441
commit
af260ad229
4 changed files with 11 additions and 0 deletions
|
@ -68,6 +68,8 @@ import {SelectCharacterScene, SelectCharacterSceneName} from "../Login/SelectCha
|
|||
import {TextureError} from "../../Exception/TextureError";
|
||||
import {TextField} from "../Components/TextField";
|
||||
|
||||
import AnimatedTiles from "phaser-animated-tiles";
|
||||
|
||||
export interface GameSceneInitInterface {
|
||||
initPosition: PointInterface|null,
|
||||
reconnecting: boolean
|
||||
|
@ -114,6 +116,7 @@ export class GameScene extends ResizableScene 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;
|
||||
|
@ -189,6 +192,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
file: 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);
|
||||
});
|
||||
|
@ -400,6 +404,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
|
||||
this.initCamera();
|
||||
|
||||
this.animatedTiles.init(this.Map);
|
||||
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