Merge branch 'feature/animated-tiles' of https://github.com/Informatic/workadventure into develop
This commit is contained in:
commit
1f4c4f21f6
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 {addLoader} from "../Components/Loader";
|
||||
|
||||
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);
|
||||
});
|
||||
|
@ -378,6 +382,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