CCAnimationCache only load from xml/plist file while Cocostudio export animation as json file.
How to read this json in C++?
Thanks
Owner answer:
CCArmatureDataManager::sharedArmatureDataManager()>addArmatureFileInfo;>getAnimation()
CCArmature *armature = CCArmature::create;
armature>playByIndex;>setScale(0.5f);
armature
armature~~>setPosition);
this~~>addChild(armature,2)
Hi,
Im having trouble getting that code to work. CCArmature doesn’t appear to be loaded.
I get an error saying that CCArmature is not a class or a namespace name. And another saying that sharedArmatureDataManager identifier not found.
what can I do to correct this?
please help.
- In jni/Android.mk:
- append cocos_extension_static to LOCAL_WHOLE_STATIC_LIBRARIES
- Add this to bottom file: $(call import-module,extensions)
- Mapping “extensions” folder to your project
- In HelloWorldScene.cpp
#include “CocoStudio/Armature/CCArmature.h”
#include “CocoStudio/Armature/utils/CCArmatureDataManager.h”
using namespace cocos2d::extension;
Hi,
When I run it I get an error : CCSprite only supports CCSprites as children when using CCSpriteBatchNode
I used :addChild(armature,2);
Thanks