public static CCAnimationCache sharedAnimationCache() { if (s_pSharedAnimationCache == null) { s_pSharedAnimationCache = new CCAnimationCache(); s_pSharedAnimationCache.init(); } return(s_pSharedAnimationCache); }
/** Retruns ths shared instance of the Animation cache */ public static CCAnimationCache sharedAnimationCache() { if (null == s_pSharedAnimationCache) { s_pSharedAnimationCache = new CCAnimationCache(); s_pSharedAnimationCache.init(); } return s_pSharedAnimationCache; }
// 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 static void PurgeSharedAnimationCache() { s_pSharedAnimationCache = null; }
public static void purgeSharedAnimationCache() { s_pSharedAnimationCache = null; }
public void setDisplayFrameWithAnimationName(string animationName, int frameIndex) { CCSpriteFrame frame = CCAnimationCache.sharedAnimationCache().animationByName(animationName).getFrames()[frameIndex]; this.DisplayFrame = frame; }
/** Purges the cache. It releases all the CCAnimation objects and the shared instance. */ public static void purgeSharedAnimationCache() { //CC_SAFE_RELEASE_NULL(s_pSharedAnimationCache); s_pSharedAnimationCache = null; }