Skip to content

Commit 0589eff

Browse files
committed
Added onStepCallback to Game step.
1 parent b438c0e commit 0589eff

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

v3/src/boot/Game.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var Class = require('../utils/Class');
33
var Config = require('./Config');
44
var DebugHeader = require('./DebugHeader');
55
var Device = require('../device');
6+
var NOOP = require('../utils/NOOP');
67

78
var AddToDOM = require('../dom/AddToDOM');
89
var DOMContentLoaded = require('../dom/DOMContentLoaded');
@@ -79,6 +80,8 @@ var Game = new Class({
7980
*/
8081
this.loop = new TimeStep(this, this.config.fps);
8182

83+
this.onStepCallback = NOOP;
84+
8285
// Wait for the DOM Ready event, then call boot.
8386
DOMContentLoaded(this.boot.bind(this));
8487

@@ -129,6 +132,8 @@ var Game = new Class({
129132

130133
// Scenes
131134

135+
this.onStepCallback();
136+
132137
for (var i = 0; i < active.length; i++)
133138
{
134139
active[i].scene.sys.step(time, delta);

0 commit comments

Comments
 (0)