mirror of
https://github.com/wassname/phaser.git
synced 2026-09-11 12:31:29 +08:00
Updated all the examples to use the new Debug methods.
This commit is contained in:
@@ -35,6 +35,6 @@ function update()
|
||||
function render() {
|
||||
|
||||
// Camera
|
||||
game.debug.renderCameraInfo(game.camera, 32, 32);
|
||||
game.debug.cameraInfo(game.camera, 32, 32);
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ function update()
|
||||
function render() {
|
||||
|
||||
// Display
|
||||
game.debug.renderSpriteBounds(sprite);
|
||||
game.debug.renderSpriteCorners(sprite, true, true);
|
||||
game.debug.spriteBounds(sprite);
|
||||
game.debug.spriteCorners(sprite, true, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ var point = new Phaser.Point( 100, 280 ) ;
|
||||
function render() {
|
||||
|
||||
// Draw debug tools
|
||||
game.debug.renderRectangle( rect, 'rgba(255,0,0,1)' ) ;
|
||||
game.debug.renderCircle( circle, 'rgba(255,255,0,1)' ) ;
|
||||
game.debug.renderPoint( point, 'rgba(255,255,255,1)' ) ;
|
||||
game.debug.renderPixel( 200, 280, 'rgba(0,255,255,1)' ) ;
|
||||
game.debug.renderText( "This is debug text", 100, 380 );
|
||||
game.debug.geom( rect, 'rgba(255,0,0,1)' ) ;
|
||||
game.debug.geom( circle, 'rgba(255,255,0,1)' ) ;
|
||||
game.debug.geom( point, 'rgba(255,255,255,1)' ) ;
|
||||
game.debug.pixel( 200, 280, 'rgba(0,255,255,1)' ) ;
|
||||
game.debug.text( "This is debug text", 100, 380 );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ function update()
|
||||
function render() {
|
||||
|
||||
// Input debug info
|
||||
game.debug.renderInputInfo(32, 32);
|
||||
game.debug.renderSpriteInputInfo(sprite, 32, 130);
|
||||
game.debug.renderPointer( game.input.activePointer );
|
||||
game.debug.inputInfo(32, 32);
|
||||
game.debug.spriteInputInfo(sprite, 32, 130);
|
||||
game.debug.pointer( game.input.activePointer );
|
||||
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ function update()
|
||||
function render() {
|
||||
|
||||
// Physics
|
||||
game.debug.renderSpriteBounds(sprite);
|
||||
game.debug.spriteBounds(sprite);
|
||||
|
||||
game.debug.renderSpriteBounds(otherSprite);
|
||||
game.debug.spriteBounds(otherSprite);
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,6 @@ function update()
|
||||
function render() {
|
||||
|
||||
// Sprite debug info
|
||||
game.debug.renderSpriteInfo(sprite, 32, 32);
|
||||
game.debug.spriteInfo(sprite, 32, 32);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user