diff --git a/samples/Lua/TestLua/Resources/luaScript/ActionsTest/ActionsTest.lua b/samples/Lua/TestLua/Resources/luaScript/ActionsTest/ActionsTest.lua index f94a4c10c5..d2b9d6b479 100644 --- a/samples/Lua/TestLua/Resources/luaScript/ActionsTest/ActionsTest.lua +++ b/samples/Lua/TestLua/Resources/luaScript/ActionsTest/ActionsTest.lua @@ -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") diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 39ae0ade27..2d0259250b 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -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], diff --git a/tools/tolua++/CCAnimationCache.pkg b/tools/tolua++/CCAnimationCache.pkg index 52def5edc5..1a899a2f48 100644 --- a/tools/tolua++/CCAnimationCache.pkg +++ b/tools/tolua++/CCAnimationCache.pkg @@ -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); };