mirror of
https://github.com/wassname/phaser.git
synced 2026-09-10 12:29:30 +08:00
Added the GameObjectManager
This commit is contained in:
@@ -211,7 +211,15 @@ module Phaser {
|
||||
}
|
||||
|
||||
public get frameTotal(): number {
|
||||
return this._frameData.total;
|
||||
|
||||
if (this._frameData)
|
||||
{
|
||||
return this._frameData.total;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public get frame(): number {
|
||||
@@ -248,6 +256,19 @@ module Phaser {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all related references
|
||||
*/
|
||||
public destroy() {
|
||||
|
||||
this._anims = {};
|
||||
this._frameData = null;
|
||||
this._frameIndex = 0;
|
||||
this.currentAnim = null;
|
||||
this.currentFrame = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user