Update InnerActionFrame.

This commit is contained in:
pipu 2015-01-12 13:54:17 +08:00
parent 34402b75c9
commit 7e83336af8
2 changed files with 11 additions and 4 deletions

View File

@ -453,6 +453,8 @@ Frame* AnchorPointFrame::clone()
// InnerActionFrame // InnerActionFrame
const std::string InnerActionFrame::AnimationAllName = "-- ALL --";
InnerActionFrame* InnerActionFrame::create() InnerActionFrame* InnerActionFrame::create()
{ {
InnerActionFrame* frame = new (std::nothrow) InnerActionFrame(); InnerActionFrame* frame = new (std::nothrow) InnerActionFrame();
@ -466,9 +468,12 @@ InnerActionFrame* InnerActionFrame::create()
} }
InnerActionFrame::InnerActionFrame() InnerActionFrame::InnerActionFrame()
: _innerActionType(LoopAction) : _innerActionType(InnerActionType::SingleFrame)
, _startFrameIndex(0) , _startFrameIndex(0)
, _endFrameIndex(0) , _endFrameIndex(0)
, _singleFrameIndex(0)
, _enterWithName(false)
, _animationName("")
{ {
} }
@ -486,7 +491,7 @@ void InnerActionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
if (_enterWithName) if (_enterWithName)
{ {
if (_animationName == "-- ALL --") if (_animationName == AnimationAllName)
{ {
start = 0; start = 0;
end = actiontimeline->getDuration(); end = actiontimeline->getDuration();

View File

@ -255,6 +255,8 @@ enum InnerActionType
class CC_STUDIO_DLL InnerActionFrame : public Frame class CC_STUDIO_DLL InnerActionFrame : public Frame
{ {
public: public:
static const std::string AnimationAllName;
static InnerActionFrame* create(); static InnerActionFrame* create();
InnerActionFrame(); InnerActionFrame();