mirror of
https://github.com/wassname/phaser.git
synced 2026-07-01 16:50:43 +08:00
Docs and Examples update.
This commit is contained in:
+48
-12
@@ -398,6 +398,20 @@
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li>
|
||||
<a href="global.html#SAT">SAT</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -662,7 +676,7 @@ Phaser.Timer.prototype = {
|
||||
{
|
||||
if (this.events[i] === event)
|
||||
{
|
||||
this.events.splice(i, 1);
|
||||
this.events[i].pendingDelete = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -725,6 +739,21 @@ Phaser.Timer.prototype = {
|
||||
|
||||
this._len = this.events.length;
|
||||
|
||||
this._i = 0;
|
||||
|
||||
while (this._i < this._len)
|
||||
{
|
||||
if (this.events[this._i].pendingDelete)
|
||||
{
|
||||
this.events.splice(this._i, 1);
|
||||
this._len--;
|
||||
}
|
||||
|
||||
this._i++;
|
||||
}
|
||||
|
||||
this._len = this.events.length;
|
||||
|
||||
if (this.running && this._now >= this.nextTick && this._len > 0)
|
||||
{
|
||||
this._i = 0;
|
||||
@@ -788,9 +817,12 @@ Phaser.Timer.prototype = {
|
||||
*/
|
||||
pause: function () {
|
||||
|
||||
this._pauseStarted = this.game.time.now;
|
||||
if (this.running && !this.expired)
|
||||
{
|
||||
this._pauseStarted = this.game.time.now;
|
||||
|
||||
this.paused = true;
|
||||
this.paused = true;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -800,17 +832,20 @@ Phaser.Timer.prototype = {
|
||||
*/
|
||||
resume: function () {
|
||||
|
||||
var pauseDuration = this.game.time.now - this._pauseStarted;
|
||||
|
||||
for (var i = 0; i < this.events.length; i++)
|
||||
if (this.running && !this.expired)
|
||||
{
|
||||
this.events[i].tick += pauseDuration;
|
||||
var pauseDuration = this.game.time.now - this._pauseStarted;
|
||||
|
||||
for (var i = 0; i < this.events.length; i++)
|
||||
{
|
||||
this.events[i].tick += pauseDuration;
|
||||
}
|
||||
|
||||
this.nextTick += pauseDuration;
|
||||
|
||||
this.paused = false;
|
||||
}
|
||||
|
||||
this.nextTick += pauseDuration;
|
||||
|
||||
this.paused = false;
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -822,6 +857,7 @@ Phaser.Timer.prototype = {
|
||||
this.onComplete.removeAll();
|
||||
this.running = false;
|
||||
this.events = [];
|
||||
this._i = this._len;
|
||||
|
||||
}
|
||||
|
||||
@@ -923,7 +959,7 @@ Phaser.Timer.prototype.constructor = Phaser.Timer;
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Wed Feb 05 2014 06:28:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user