2013-03-07 46 views
0

我有我的關於一個animation.Sqeuence probling。 只有第一個序列元素正在執行。第二個被忽略。 我想雪碧spell_1移動到英雄(hero_x_exact,hero_y_exact),之後到目的地。 每個元素本身而不是在一個序列正常工作。LimeJS animation.Sequence沒有完成

goog.require('lime.animation.Sequence'); 

... 

var spellmovement = new lime.animation.Sequence(
    spell_1.runAction(new lime.animation.MoveTo(hero_x_exact,hero_y_exact).setDuration(1).enableOptimizations()), 
    spell_1.runAction(new lime.animation.MoveTo(target_coord_x_spell,target_coord_y_spell).setDuration(1).enableOptimizations()) 
); 

回答

0

什麼可能會更好使用spritesheet上的每個動畫都使用spritesheet然後你可以建立一些按名稱加載每個動畫的東西。 Obj_Walk001.png,Obj_Walk002.png

然後創建讀取每幀每個動畫在所述調度管理器的方法。

您可以找到這段代碼limejs /石灰/演示/測試的一個例子。然後goto run.htm並點擊Frame4這個將告訴你limejs是如何去做的。

+0

嘿,感謝您的回答,但我不知道這是怎麼幫助我。問題在於,在移動精靈之後,在給精靈一個新的位置之後,我不能移動它。圖層變成灰色... – user2058521 2013-03-09 11:58:36