본문 바로가기
Cocos2D-x

CocoStudio에서 생성한 Animation v2.x에서 사용하기 (출처: 메뉴얼)

by CodeDiver 2014. 11. 4.

Use in Project - v2.x 인듯 (2.0.4는 안됨?!)

Export

  1. From the File menu, select the Export Projects option.

  2. Sets the export directory and other options.

  3. Select Yes to start the export.

Copy file

 

Copies all files located in the export directory to the project's Resource directory.

 

Use

Copies export files to the Resource directory.

//async loading export file
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo("Cowboy0.png","Cowboy0.plist","Cowboy.ExportJson");

//Creat armature by name
CCArmature *armature = CCArmature::create("Cowboy");

//play animation by animation index
armature->getAnimation()->playByIndex(0);

//Change Permissions
armature->setScale(0.5f);

//Set the armature position
armature->setPosition(200,300);

//add to the current scene
this->addChild(armature,2)



출처: http://upyun.cocimg.com/CocoStudio/helpdoc/v1.0.0.0/en/index.html