Fixes bug that clone InnerActionFrame.

This commit is contained in:
pipu 2015-01-12 11:09:19 +08:00
parent 78b32332d3
commit 6237115fbf
2 changed files with 11 additions and 3 deletions

View File

@ -134,7 +134,7 @@ public:
virtual const cocos2d::Vector<Timeline*>& getTimelines() const { return _timelineList; }
/** add ActionIndexes*/
/** AnimationInfo*/
virtual void addAnimationInfo(const AnimationInfo& animationInfo);
virtual void removeAnimationInfo(std::string animationName);
virtual bool IsAnimationInfoExists(const std::string& animationName);

View File

@ -549,8 +549,16 @@ Frame* InnerActionFrame::clone()
{
InnerActionFrame* frame = InnerActionFrame::create();
frame->setInnerActionType(_innerActionType);
frame->setStartFrameIndex(_startFrameIndex);
frame->setEndFrameIndex(_endFrameIndex);
if(_enterWithName)
{
frame->setEnterWithName(true);
frame->setAnimationName(_animationName);
}
else
{
frame->setStartFrameIndex(_startFrameIndex);
frame->setEndFrameIndex(_endFrameIndex);
}
frame->cloneProperty(this);
return frame;