mirror of
https://github.com/wassname/phaser.git
synced 2026-07-19 11:26:26 +08:00
Updated documentation.
This commit is contained in:
+62
-18
@@ -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>
|
||||
@@ -406,13 +446,13 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||||
*/
|
||||
this.game = game;
|
||||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {Phaser.Sprite} _parent - A reference to the parent Sprite that owns this Animation.
|
||||
* @private
|
||||
*/
|
||||
this._parent = parent;
|
||||
this._parent = parent;
|
||||
|
||||
/**
|
||||
* @property {Phaser.FrameData} _frameData - The FrameData the Animation uses.
|
||||
@@ -429,18 +469,18 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
* @property {object} _frames
|
||||
* @private
|
||||
*/
|
||||
this._frames = [];
|
||||
this._frames = [];
|
||||
this._frames = this._frames.concat(frames);
|
||||
|
||||
/**
|
||||
* @property {number} delay - The delay in ms between each frame of the Animation.
|
||||
*/
|
||||
this.delay = 1000 / delay;
|
||||
this.delay = 1000 / delay;
|
||||
|
||||
/**
|
||||
* @property {boolean} looped - The loop state of the Animation.
|
||||
*/
|
||||
this.looped = looped;
|
||||
this.looped = looped;
|
||||
|
||||
/**
|
||||
* @property {boolean} looped - The loop state of the Animation.
|
||||
@@ -451,13 +491,13 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
* @property {boolean} isFinished - The finished state of the Animation. Set to true once playback completes, false during playback.
|
||||
* @default
|
||||
*/
|
||||
this.isFinished = false;
|
||||
this.isFinished = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isPlaying - The playing state of the Animation. Set to false once playback completes, true during playback.
|
||||
* @default
|
||||
*/
|
||||
this.isPlaying = false;
|
||||
this.isPlaying = false;
|
||||
|
||||
/**
|
||||
* @property {boolean} isPaused - The paused state of the Animation.
|
||||
@@ -477,7 +517,7 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._frameIndex = 0;
|
||||
this._frameIndex = 0;
|
||||
|
||||
/**
|
||||
* @property {number} _frameDiff
|
||||
@@ -496,8 +536,8 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope
|
||||
/**
|
||||
* @property {Phaser.Frame} currentFrame - The currently displayed frame of the Animation.
|
||||
*/
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Animation.prototype = {
|
||||
@@ -542,7 +582,7 @@ Phaser.Animation.prototype = {
|
||||
this._frameIndex = 0;
|
||||
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
|
||||
if (this._parent.events)
|
||||
{
|
||||
@@ -609,7 +649,7 @@ Phaser.Animation.prototype = {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.isPlaying == true && this.game.time.now >= this._timeNextFrame)
|
||||
if (this.isPlaying === true && this.game.time.now >= this._timeNextFrame)
|
||||
{
|
||||
this._frameSkip = 1;
|
||||
|
||||
@@ -653,7 +693,11 @@ Phaser.Animation.prototype = {
|
||||
else
|
||||
{
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
|
||||
if (this.currentFrame)
|
||||
{
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -710,7 +754,7 @@ Phaser.Animation.prototype = {
|
||||
* @name Phaser.Animation#paused
|
||||
* @property {boolean} paused - Gets and sets the paused state of this Animation.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Animation.prototype, "paused", {
|
||||
Object.defineProperty(Phaser.Animation.prototype, 'paused', {
|
||||
|
||||
get: function () {
|
||||
|
||||
@@ -745,7 +789,7 @@ Object.defineProperty(Phaser.Animation.prototype, "paused", {
|
||||
* @property {number} frameTotal - The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(Phaser.Animation.prototype, "frameTotal", {
|
||||
Object.defineProperty(Phaser.Animation.prototype, 'frameTotal', {
|
||||
|
||||
get: function () {
|
||||
return this._frames.length;
|
||||
@@ -757,7 +801,7 @@ Object.defineProperty(Phaser.Animation.prototype, "frameTotal", {
|
||||
* @name Phaser.Animation#frame
|
||||
* @property {number} frame - Gets or sets the current frame index and updates the Texture Cache for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Animation.prototype, "frame", {
|
||||
Object.defineProperty(Phaser.Animation.prototype, 'frame', {
|
||||
|
||||
get: function () {
|
||||
|
||||
@@ -779,7 +823,7 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", {
|
||||
if (this.currentFrame !== null)
|
||||
{
|
||||
this._frameIndex = value;
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -868,7 +912,7 @@ Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zer
|
||||
|
||||
<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