remove redundancy

This commit is contained in:
Lurkars 2021-02-27 15:52:17 +01:00 committed by David Négrier
parent 93b7b7bc91
commit 66b90be0da
1 changed files with 1 additions and 2 deletions

View File

@ -411,9 +411,8 @@ export class GameScene extends ResizableScene implements CenterListener {
//add layer on map
this.Layers = new Array<Phaser.Tilemaps.StaticTilemapLayer>();
let depth = this.createHelper(this.mapFile.layers, -2, '');
if (depth === -2) {
if (this.createHelper(this.mapFile.layers, -2, '') === -2) {
throw new Error('Your map MUST contain a layer of type "objectgroup" whose name is "floorLayer" that represents the layer characters are drawn at.');
}