0
有沒有人知道如何從特定索引(在我的情況下,從當前索引)爲精靈製作動畫?我嘗試一些但沒有成功 -如何從特定索引設置animatedSprite的動畫效果? - andengine
if (!sprite.isAnimationRunning()) {
int index = sprite.getCurrentTileIndex();
sprite.animate(frameDurations, index, 7, true);
}
並且每次我有一個異常,因爲frameDurations不等於frameCount。我只是想按下按鈕時從currentIndex動畫精靈。 :/
我寫動畫的第7和第8幀這在我的問題中,但它不工作,就像那樣..因爲當前索引每次都在變化,當索引被改變時,「new long [] {}」應該是不同的。在我的情況下,我發現這個long [] frameDuration與「for循環」,但我不知道這是否是這樣做的好方法。不管怎麼說,還是要謝謝你 :) – Shefchenko