Merge pull request #1232 from thecodingmachine/fixCollides
Fix collides
This commit is contained in:
commit
8c8649b584
1 changed files with 11 additions and 13 deletions
|
@ -1164,7 +1164,6 @@ ${escapedMessage}
|
||||||
createCollisionWithPlayer() {
|
createCollisionWithPlayer() {
|
||||||
//add collision layer
|
//add collision layer
|
||||||
for (const phaserLayer of this.gameMap.phaserLayers) {
|
for (const phaserLayer of this.gameMap.phaserLayers) {
|
||||||
if (phaserLayer.type == "tilelayer") {
|
|
||||||
this.physics.add.collider(this.CurrentPlayer, phaserLayer, (object1: GameObject, object2: GameObject) => {
|
this.physics.add.collider(this.CurrentPlayer, phaserLayer, (object1: GameObject, object2: GameObject) => {
|
||||||
//this.CurrentPlayer.say("Collision with layer : "+ (object2 as Tile).layer.name)
|
//this.CurrentPlayer.say("Collision with layer : "+ (object2 as Tile).layer.name)
|
||||||
});
|
});
|
||||||
|
@ -1180,7 +1179,6 @@ ${escapedMessage}
|
||||||
//});
|
//});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
createCurrentPlayer() {
|
createCurrentPlayer() {
|
||||||
//TODO create animation moving between exit and start
|
//TODO create animation moving between exit and start
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue