mirror of
https://github.com/wassname/phaser.git
synced 2026-08-09 12:20:34 +08:00
Tilemap collision fixed, regardless of rotation, number of overlapping tiles and speed (to a point anyway). Maps also don't crash if they are smaller than the render area. Layers can be positioned successfully anywhere in camera but collision isn't yet offset for this.
This commit is contained in:
+9
-6
@@ -636,8 +636,11 @@ Phaser.Utils.Debug.prototype = {
|
||||
|
||||
this.start(0, 0, color);
|
||||
|
||||
// this.context.fillStyle = color;
|
||||
// this.context.fillRect(sprite.body.screenX, sprite.body.screenY, sprite.body.width, sprite.body.height);
|
||||
this.context.fillStyle = color;
|
||||
this.context.fillRect(sprite.body.screenX, sprite.body.screenY, sprite.body.width, sprite.body.height);
|
||||
|
||||
this.stop();
|
||||
this.start(0, 0, color);
|
||||
|
||||
this.context.beginPath();
|
||||
this.context.strokeStyle = '#000000';
|
||||
@@ -699,11 +702,11 @@ Phaser.Utils.Debug.prototype = {
|
||||
}
|
||||
else
|
||||
{
|
||||
// this.context.strokeStyle = color;
|
||||
// this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height);
|
||||
// this.context.strokeRect(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height);
|
||||
this.context.strokeStyle = color;
|
||||
this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height);
|
||||
this.context.strokeRect(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height);
|
||||
// this.context.strokeRect(sprite.body.hull.x, sprite.body.hull.y, sprite.body.hull.width, sprite.body.hull.height);
|
||||
// this.context.stroke();
|
||||
this.context.stroke();
|
||||
|
||||
// this.context.strokeStyle = '#ff0000';
|
||||
// this.context.strokeRect(sprite.body.hullX.x, sprite.body.hullX.y, sprite.body.hullX.width, sprite.body.hullX.height);
|
||||
|
||||
Reference in New Issue
Block a user