mirror of
https://github.com/wassname/phaser.git
synced 2026-08-18 12:20:33 +08:00
Phaser.Timer is now feature complete and fully documented. You can create Phaser.TimerEvents on a Timer and lots of new examples have been provided.
This commit is contained in:
@@ -14,6 +14,8 @@ function create() {
|
||||
|
||||
game.stage.backgroundColor = '#007236';
|
||||
|
||||
|
||||
|
||||
// Every second we will call the addSprite function. This will happen 10 times and then stop.
|
||||
// The final parameter is the one that will be sent to the addSprite function and in this case is the sprite key.
|
||||
game.time.repeatEvent(Phaser.Timer.SECOND, 10, addSprite, this, 'mushroom');
|
||||
|
||||
Reference in New Issue
Block a user