mirror of
https://github.com/wassname/phaser.git
synced 2026-07-05 17:30:19 +08:00
Fixed the TweenManager and added support to GameObjectFactory, so you can create tweens easily now all hooked in to the internal game clock. Also added the AnimationManager into Sprite, so you can create and play animations directly from sprites nice and easily.
This commit is contained in:
@@ -47,9 +47,14 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
||||
*/
|
||||
this.texture = PIXI.TextureCache[key];
|
||||
|
||||
if (this.game.cache.isSpriteSheet(key))
|
||||
{
|
||||
this.animations.loadFrameData(this.game.cache.getFrameData(key));
|
||||
}
|
||||
|
||||
if (frame !== null)
|
||||
{
|
||||
if (typeof frame == 'string')
|
||||
if (typeof frame === 'string')
|
||||
{
|
||||
this.frameName = frame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user