mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
20 lines
414 B
JavaScript
20 lines
414 B
JavaScript
|
|
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create, render: render });
|
|
|
|
var circle;
|
|
var floor;
|
|
|
|
function create() {
|
|
|
|
circle = new Phaser.Circle(game.world.centerX, 100,64);
|
|
|
|
}
|
|
|
|
function render () {
|
|
|
|
game.debug.circle(circle,'#cfffff');
|
|
game.debug.text('Diameter : '+circle.diameter,50,200);
|
|
game.debug.text('Circumference : '+circle.circumference(),50,230);
|
|
|
|
}
|