issue #2397: sharedAnimationCache --> getInstance.

This commit is contained in:
James Chen 2013-07-12 13:54:56 +08:00
parent 853a503d2f
commit 41957f06c9
3 changed files with 9 additions and 3 deletions

View File

@ -515,7 +515,7 @@ local function ActionAnimate()
local action = CCAnimate:create(animation)
grossini:runAction(CCSequence:createWithTwoActions(action, action:reverse()))
local cache = CCAnimationCache:sharedAnimationCache()
local cache = CCAnimationCache:getInstance()
cache:addAnimationsWithFile("animations/animations-2.plist")
local animation2 = cache:animationByName("dance_1")

View File

@ -103,7 +103,8 @@ skip = Node::[^setPosition$ getGrid setGLServerState description getUserObject .
SimpleAudioEngine::[getClassTypeInfo],
Application::[^application.* ^run$],
Camera::[getEyeXYZ getCenterXYZ getUpXYZ],
ShaderCache::[sharedShaderCache, purgeSharedShaderCache],
ShaderCache::[sharedShaderCache purgeSharedShaderCache],
AnimationCache::[sharedAnimationCache purgeSharedAnimationCache],
ccFontDefinition::[*]
rename_functions = SpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame isFlipX=isFlippedX isFlipY=isFlippedY],
@ -111,7 +112,7 @@ rename_functions = SpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpri
ProgressTimer::[setReverseProgress=setReverseDirection],
TextureCache::[sharedTextureCache=getInstance],
Animation::[addSpriteFrameWithFileName=addSpriteFrameWithFile],
AnimationCache::[sharedAnimationCache=getInstance addAnimationsWithFile=addAnimations animationByName=getAnimation removeAnimationByName=removeAnimation],
AnimationCache::[addAnimationsWithFile=addAnimations animationByName=getAnimation removeAnimationByName=removeAnimation],
LayerGradient::[initWithColor=init],
LayerColor::[initWithColor=init],
GLProgram::[fragmentShaderLog=getFragmentShaderLog initWithVertexShaderByteArray=initWithString initWithVertexShaderFilename=init programLog=getProgramLog setUniformLocationWith1i=setUniformLocationI32 vertexShaderLog=getVertexShaderLog],

View File

@ -5,9 +5,14 @@ class CCAnimationCache : public CCObject
void removeAnimationByName(const char* name);
CCAnimation* animationByName(const char* name);
// XXX deprecated, use getInstance instead
static CCAnimationCache* sharedAnimationCache(void);
// XXX deprecated, use destroyInstance instead
static void purgeSharedAnimationCache(void);
static CCAnimationCache* getInstance(void);
static void destroyInstance(void);
void addAnimationsWithDictionary(CCDictionary* dictionary);
void addAnimationsWithFile(const char* plist);
};