mirror of
https://github.com/wassname/phaser.git
synced 2026-08-03 13:10:25 +08:00
Updated documentation.
This commit is contained in:
+69
-63
@@ -54,6 +54,10 @@
|
||||
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.BitmapData.html">BitmapData</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.BitmapText.html">BitmapText</a>
|
||||
</li>
|
||||
@@ -138,6 +142,10 @@
|
||||
<a href="Phaser.Events.html">Events</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Filter.html">Filter</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Frame.html">Frame</a>
|
||||
</li>
|
||||
@@ -302,6 +310,26 @@
|
||||
<a href="Phaser.Text.html">Text</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Tile.html">Tile</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Tilemap.html">Tilemap</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Tileset.html">Tileset</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TileSprite.html">TileSprite</a>
|
||||
</li>
|
||||
@@ -310,6 +338,10 @@
|
||||
<a href="Phaser.Time.html">Time</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
@@ -356,6 +388,14 @@
|
||||
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#render">render</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#renderXY">renderXY</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#right">right</a>
|
||||
</li>
|
||||
@@ -403,124 +443,91 @@ Phaser.Time = function (game) {
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* The time at which the Game instance started.
|
||||
* @property {number} _started
|
||||
* @property {number} _started - The time at which the Game instance started.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._started = 0;
|
||||
|
||||
/**
|
||||
* The time (in ms) that the last second counter ticked over.
|
||||
* @property {number} _timeLastSecond
|
||||
* @property {number} _timeLastSecond - The time (in ms) that the last second counter ticked over.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._timeLastSecond = 0;
|
||||
|
||||
/**
|
||||
* The time the game started being paused.
|
||||
* @property {number} _pauseStarted
|
||||
* @property {number} _pauseStarted - The time the game started being paused.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._pauseStarted = 0;
|
||||
|
||||
/**
|
||||
* The elapsed time calculated for the physics motion updates.
|
||||
* @property {number} physicsElapsed
|
||||
* @default
|
||||
* @property {number} physicsElapsed - The elapsed time calculated for the physics motion updates.
|
||||
*/
|
||||
this.physicsElapsed = 0;
|
||||
|
||||
/**
|
||||
* Game time counter.
|
||||
* @property {number} time
|
||||
* @default
|
||||
* @property {number} time - Game time counter.
|
||||
*/
|
||||
this.time = 0;
|
||||
|
||||
/**
|
||||
* Records how long the game has been paused for. Is reset each time the game pauses.
|
||||
* @property {number} pausedTime
|
||||
* @default
|
||||
* @property {number} pausedTime - Records how long the game has been paused for. Is reset each time the game pauses.
|
||||
*/
|
||||
this.pausedTime = 0;
|
||||
|
||||
/**
|
||||
* The time right now.
|
||||
* @property {number} now
|
||||
* @default
|
||||
* @property {number} now - The time right now.
|
||||
*/
|
||||
this.now = 0;
|
||||
|
||||
/**
|
||||
* Elapsed time since the last frame.
|
||||
* @property {number} elapsed
|
||||
* @default
|
||||
* @property {number} elapsed - Elapsed time since the last frame.
|
||||
*/
|
||||
this.elapsed = 0;
|
||||
|
||||
/**
|
||||
* Frames per second.
|
||||
* @property {number} fps
|
||||
* @default
|
||||
* @property {number} fps - Frames per second.
|
||||
*/
|
||||
this.fps = 0;
|
||||
|
||||
/**
|
||||
* The lowest rate the fps has dropped to.
|
||||
* @property {number} fpsMin
|
||||
* @default
|
||||
* @property {number} fpsMin - The lowest rate the fps has dropped to.
|
||||
*/
|
||||
this.fpsMin = 1000;
|
||||
|
||||
/**
|
||||
* The highest rate the fps has reached (usually no higher than 60fps).
|
||||
* @property {number} fpsMax
|
||||
* @default
|
||||
* @property {number} fpsMax - The highest rate the fps has reached (usually no higher than 60fps).
|
||||
*/
|
||||
this.fpsMax = 0;
|
||||
|
||||
/**
|
||||
* The minimum amount of time the game has taken between two frames.
|
||||
* @property {number} msMin
|
||||
* @property {number} msMin - The minimum amount of time the game has taken between two frames.
|
||||
* @default
|
||||
*/
|
||||
this.msMin = 1000;
|
||||
|
||||
/**
|
||||
* The maximum amount of time the game has taken between two frames.
|
||||
* @property {number} msMax
|
||||
* @default
|
||||
* @property {number} msMax - The maximum amount of time the game has taken between two frames.
|
||||
*/
|
||||
this.msMax = 0;
|
||||
|
||||
/**
|
||||
* The number of frames record in the last second.
|
||||
* @property {number} frames
|
||||
* @default
|
||||
* @property {number} frames - The number of frames record in the last second.
|
||||
*/
|
||||
this.frames = 0;
|
||||
|
||||
/**
|
||||
* Records how long the game was paused for in miliseconds.
|
||||
* @property {number} pauseDuration
|
||||
* @default
|
||||
* @property {number} pauseDuration - Records how long the game was paused for in miliseconds.
|
||||
*/
|
||||
this.pauseDuration = 0;
|
||||
|
||||
/**
|
||||
* The value that setTimeout needs to work out when to next update
|
||||
* @property {number} timeToCall
|
||||
* @default
|
||||
* @property {number} timeToCall - The value that setTimeout needs to work out when to next update
|
||||
*/
|
||||
this.timeToCall = 0;
|
||||
|
||||
/**
|
||||
* Internal value used by timeToCall as part of the setTimeout loop
|
||||
* @property {number} lastTime
|
||||
* @default
|
||||
* @property {number} lastTime - Internal value used by timeToCall as part of the setTimeout loop
|
||||
*/
|
||||
this.lastTime = 0;
|
||||
|
||||
@@ -529,9 +536,8 @@ Phaser.Time = function (game) {
|
||||
this.game.onResume.add(this.gameResumed, this);
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {boolean} _justResumed
|
||||
* @default
|
||||
* @property {boolean} _justResumed - Internal value used to recover from the game pause state.
|
||||
* @private
|
||||
*/
|
||||
this._justResumed = false;
|
||||
|
||||
@@ -539,15 +545,6 @@ Phaser.Time = function (game) {
|
||||
|
||||
Phaser.Time.prototype = {
|
||||
|
||||
/**
|
||||
* The number of seconds that have elapsed since the game was started.
|
||||
* @method Phaser.Time#totalElapsedSeconds
|
||||
* @return {number}
|
||||
*/
|
||||
totalElapsedSeconds: function() {
|
||||
return (this.now - this._started) * 0.001;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the game clock and calculate the fps. This is called automatically by Phaser.Game.
|
||||
* @method Phaser.Time#update
|
||||
@@ -624,6 +621,15 @@ Phaser.Time.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* The number of seconds that have elapsed since the game was started.
|
||||
* @method Phaser.Time#totalElapsedSeconds
|
||||
* @return {number}
|
||||
*/
|
||||
totalElapsedSeconds: function() {
|
||||
return (this.now - this._started) * 0.001;
|
||||
},
|
||||
|
||||
/**
|
||||
* How long has passed since the given time.
|
||||
* @method Phaser.Time#elapsedSince
|
||||
@@ -673,7 +679,7 @@ Phaser.Time.prototype = {
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Thu Nov 07 2013 06:07:33 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
on Thu Nov 28 2013 15:56:25 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