cocos2d - X 노드 (CCActionObject. h) API
cocos2d - X 노드 (CCActionObject. h) API
따뜻 한 알림: 여러분 이 더 잘 공부 할 수 있 도록 본인 의 블 로 그 를 보 는 것 을 강력 추천 합 니 다. Cocos2d - X 권위 있 는 안내서 노트
대상 이름, 프레임 의 시간 간격, 재생 / 정지 / 일시 정지, 액 션 노드 를 재생 액 션 으로 추가 / 제거 합 니 다.
///cocos2d-x-3.0alpha0/extensions/CocoStudio/Action
// , , / / action, / ActionNode action.
#ifndef __ActionObject_H__
#define __ActionObject_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "CCActionNode.h"
#include "../Json/CSContentJsonDictionary.h"
NS_CC_EXT_BEGIN
class ActionObject:public Object
{
public:
/**
* Default constructor //
*/
ActionObject();
/**
* Default destructor //
*/
virtual ~ActionObject();
/**
* Sets
*
* @param name
*/
void setName(const char* name);
const char* getName();
/**
* Sets action
*
* @param bLoop action
*/
void setLoop(bool bLoop);
bool getLoop();
/**
* Sets 。
*
* @param fTime 。
*/
void setUnitTime(float fTime);
float getUnitTime();
/**
* Sets
*
* @param fTime
*/
void setCurrentTime(float fTime);
float getCurrentTime();
/**
* Return action .
*
* @return true action , false the otherwise
*/
bool isPlaying();
/**
* action.
*/
void play();
/**
* Pause the action.
*/
void pause();
/**
* Stop the action.
*/
void stop();
/**
* ActionNode action.
*
* @node the ActionNode which will play the action
*/
void addActionNode(ActionNode* node);
/**
* Removes a ActionNode which play the action.
*
* @node the ActionNode which play the action
*/
void removeActionNode(ActionNode* node);
/*update frame method*/
void updateToFrameByTime(float fTime);
/* json */
void initWithDictionary(cs::JsonDictionary* dic,Object* root);
protected:
Array* _actionNodeList;/*actionnode*/
std::string _name;
bool _loop;
bool _bPause;
bool _bPlaying;
float _fUnitTime;
float _currentTime;
};
NS_CC_EXT_END
#endif
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
초기 Swift에서 Cocos2D 초기화 코드 재구성판다 돼지·후페가 창작하거나 번역한 작품.전재를 환영합니다. 전재는 출처를 밝혀 주십시오.잘 못 썼다고 생각되면 의견을 많이 내주시고 괜찮다고 생각되면 좋아요를 많이 눌러주세요.감사합니다!hopy ;) 우리는 초기의...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.