Skip to content

Commit 2eab5d4

Browse files
committed
Debug functions and more examples
1 parent 7342ce6 commit 2eab5d4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/input/keyboard justpressed.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ function create() {
1919

2020
bullets = game.add.group();
2121
bullets.createMultiple(10, 'bullet');
22+
bullets.setAll('physicsEnabled',true);
2223
bullets.callAll('events.onOutOfBounds.add', 'events.onOutOfBounds', resetBullet, this);
2324

2425
sprite = game.add.sprite(400, 550, 'phaser');
2526

27+
sprite.physicsEnabled = true;
28+
2629
// Stop the following keys from propagating up to the browser
2730
game.input.keyboard.addKeyCapture([ Phaser.Keyboard.LEFT, Phaser.Keyboard.RIGHT, Phaser.Keyboard.SPACEBAR ]);
2831

0 commit comments

Comments
 (0)