Added warning to Tile.destroy

This commit is contained in:
2019-05-31 16:10:46 +02:00
parent f39b7ae14a
commit 107529f844
4 changed files with 32 additions and 12 deletions
+3 -1
View File
@@ -3232,7 +3232,9 @@
keepOnStage(velocity, collision = 0.5) {
let stagePolygon = this.containerPolygon;
if (!stagePolygon) return
// UO: since keepOnStage is called in nextVelocity we need to
// ensure a return value
if (!stagePolygon) return { x: 0, y: 0}
let polygon = this.polygon;
let bounced = this.bouncing();
if (bounced) {