mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Added onStepCallback to Game step.
This commit is contained in:
parent
b438c0ead8
commit
0589effa22
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ var Class = require('../utils/Class');
|
|||
var Config = require('./Config');
|
||||
var DebugHeader = require('./DebugHeader');
|
||||
var Device = require('../device');
|
||||
var NOOP = require('../utils/NOOP');
|
||||
|
||||
var AddToDOM = require('../dom/AddToDOM');
|
||||
var DOMContentLoaded = require('../dom/DOMContentLoaded');
|
||||
|
@ -79,6 +80,8 @@ var Game = new Class({
|
|||
*/
|
||||
this.loop = new TimeStep(this, this.config.fps);
|
||||
|
||||
this.onStepCallback = NOOP;
|
||||
|
||||
// Wait for the DOM Ready event, then call boot.
|
||||
DOMContentLoaded(this.boot.bind(this));
|
||||
|
||||
|
@ -129,6 +132,8 @@ var Game = new Class({
|
|||
|
||||
// Scenes
|
||||
|
||||
this.onStepCallback();
|
||||
|
||||
for (var i = 0; i < active.length; i++)
|
||||
{
|
||||
active[i].scene.sys.step(time, delta);
|
||||
|
|
Loading…
Reference in a new issue