Merge branch 'develop' of github.com:thecodingmachine/workadventure into adminSvelte

This commit is contained in:
GRL 2021-06-22 16:08:06 +02:00
commit 0728d462a5
9 changed files with 177 additions and 4 deletions

View file

@ -44,6 +44,7 @@
"generic-type-guard": "^3.2.0",
"google-protobuf": "^3.13.0",
"phaser": "^3.54.0",
"phaser-animated-tiles": "workadventure/phaser-animated-tiles#da68bbededd605925621dd4f03bd27e69284b254",
"phaser3-rex-plugins": "^1.1.42",
"queue-typescript": "^1.0.1",
"quill": "1.3.6",

View file

@ -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

View file

@ -4098,6 +4098,10 @@ pbkdf2@^3.0.3:
safe-buffer "^5.0.1"
sha.js "^2.4.8"
phaser-animated-tiles@workadventure/phaser-animated-tiles#da68bbededd605925621dd4f03bd27e69284b254:
version "2.0.2"
resolved "https://codeload.github.com/workadventure/phaser-animated-tiles/tar.gz/da68bbededd605925621dd4f03bd27e69284b254"
phaser3-rex-plugins@^1.1.42:
version "1.1.47"
resolved "https://registry.yarnpkg.com/phaser3-rex-plugins/-/phaser3-rex-plugins-1.1.47.tgz#89299369437a0032ad31c64e89a26d20fd8a5867"