mirror of https://github.com/axmolengine/axmol.git
Update InnerActionFrame.
This commit is contained in:
parent
34402b75c9
commit
7e83336af8
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue