mirror of https://github.com/axmolengine/axmol.git
make CCBAnimationManager::getSequenceId public; add method CCBAnimationManager::getSequenceDuration to get duration of timeline;
This commit is contained in:
parent
1aadf55b59
commit
77d6692fed
|
@ -262,6 +262,14 @@ CCBSequence* CCBAnimationManager::getSequence(int nSequenceId)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
float CCBAnimationManager::getSequenceDuration(const char *pSequenceName)
|
||||
{
|
||||
int id = getSequenceId(pSequenceName);
|
||||
if (id != -1)
|
||||
return getSequence(id)->getDuration();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void CCBAnimationManager::moveAnimationsFromNode(Node* fromNode, Node* toNode) {
|
||||
|
||||
|
|
|
@ -87,10 +87,15 @@ public:
|
|||
|
||||
Object* actionForCallbackChannel(CCBSequenceProperty* channel);
|
||||
Object* actionForSoundChannel(CCBSequenceProperty* channel);
|
||||
|
||||
// return -1 if timeline not exsit
|
||||
int getSequenceId(const char* pSequenceName);
|
||||
|
||||
// get timeline duration
|
||||
float getSequenceDuration(const char* pSequenceName);
|
||||
|
||||
private:
|
||||
Object* getBaseValue(Node *pNode, const char* propName);
|
||||
int getSequenceId(const char* pSequenceName);
|
||||
CCBSequence* getSequence(int nSequenceId);
|
||||
ActionInterval* getAction(CCBKeyframe *pKeyframe0, CCBKeyframe *pKeyframe1, const char *propName, Node *pNode);
|
||||
void setAnimatedProperty(const char *propName, Node *pNode, Object *pValue, float fTweenDuraion);
|
||||
|
|
Loading…
Reference in New Issue