Debug functions and more examples

This commit is contained in:
alvinsight
2014-02-21 16:37:57 +00:00
parent 7342ce603a
commit 2eab5d4815
+3
View File
@@ -19,10 +19,13 @@ function create() {
bullets = game.add.group();
bullets.createMultiple(10, 'bullet');
bullets.setAll('physicsEnabled',true);
bullets.callAll('events.onOutOfBounds.add', 'events.onOutOfBounds', resetBullet, this);
sprite = game.add.sprite(400, 550, 'phaser');
sprite.physicsEnabled = true;
// Stop the following keys from propagating up to the browser
game.input.keyboard.addKeyCapture([ Phaser.Keyboard.LEFT, Phaser.Keyboard.RIGHT, Phaser.Keyboard.SPACEBAR ]);