mirror of
https://github.com/wassname/phaser.git
synced 2026-07-02 17:00:42 +08:00
Tilemap Collision in and working :) Needs testing against Groups now.
This commit is contained in:
@@ -312,6 +312,22 @@ Phaser.Utils.Debug.prototype = {
|
||||
|
||||
},
|
||||
|
||||
renderSpriteCollision: function (sprite, x, y, color) {
|
||||
|
||||
color = color || 'rgb(255,255,255)';
|
||||
|
||||
this.start(x, y, color);
|
||||
this.line('Sprite Collision: (' + sprite.width + ' x ' + sprite.height + ')');
|
||||
this.line('left: ' + sprite.body.touching.left);
|
||||
this.line('right: ' + sprite.body.touching.right);
|
||||
this.line('up: ' + sprite.body.touching.up);
|
||||
this.line('down: ' + sprite.body.touching.down);
|
||||
this.line('velocity.x: ' + sprite.body.velocity.x);
|
||||
this.line('velocity.y: ' + sprite.body.velocity.y);
|
||||
this.stop();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Render debug information about the Input object.
|
||||
* @param x {number} X position of the debug info to be rendered.
|
||||
|
||||
Reference in New Issue
Block a user