// Animation /// <summary> /// changes the display frame with animation name and index. /// The animation name will be get from the CCAnimationCache /// @since v0.99.5 /// </summary> public void setDisplayFrameWithAnimationName(string animationName, int frameIndex) { Debug.Assert(animationName != null); CCAnimation a = CCAnimationCache.sharedAnimationCache().animationByName(animationName); Debug.Assert(a != null); CCSpriteFrame frame = a.getFrames()[frameIndex]; Debug.Assert(frame != null); DisplayFrame = frame; }
public void setDisplayFrameWithAnimationName(string animationName, int frameIndex) { CCSpriteFrame frame = CCAnimationCache.sharedAnimationCache().animationByName(animationName).getFrames()[frameIndex]; this.DisplayFrame = frame; }