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:
Richard Davey
2013-08-30 17:09:43 +01:00
parent 936118bd91
commit e77f5da2cd
7 changed files with 55 additions and 26 deletions
+6 -1
View File
@@ -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;
}