修复Action在拷贝和逆向拷贝时导致错误的BUG
This commit is contained in:
parent
c365364255
commit
5d51e7143d
|
|
@ -8,6 +8,8 @@ Action::Action() :
|
||||||
{
|
{
|
||||||
// 默认动作 15ms 运行一次
|
// 默认动作 15ms 运行一次
|
||||||
setInterval(15);
|
setInterval(15);
|
||||||
|
// 保留动作
|
||||||
|
this->retain();
|
||||||
}
|
}
|
||||||
|
|
||||||
Action::~Action()
|
Action::~Action()
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ ActionCallback::~ActionCallback()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionCallback * ActionCallback::copy()
|
ActionCallback * ActionCallback::copy() const
|
||||||
{
|
{
|
||||||
return new ActionCallback(m_Callback);
|
return new ActionCallback(m_Callback);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ ActionDelay::~ActionDelay()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionDelay * easy2d::ActionDelay::copy()
|
ActionDelay * ActionDelay::copy() const
|
||||||
{
|
{
|
||||||
return new ActionDelay(*this);
|
return new ActionDelay(m_nMilliSeconds / 1000.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionDelay::_init()
|
void ActionDelay::_init()
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,12 @@ ActionFrames::ActionFrames() :
|
||||||
setInterval(500);
|
setInterval(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ActionFrames::ActionFrames(UINT frameDelay) :
|
||||||
|
m_nFrameIndex(0)
|
||||||
|
{
|
||||||
|
setInterval(frameDelay);
|
||||||
|
}
|
||||||
|
|
||||||
ActionFrames::~ActionFrames()
|
ActionFrames::~ActionFrames()
|
||||||
{
|
{
|
||||||
for (auto frame : m_vFrames)
|
for (auto frame : m_vFrames)
|
||||||
|
|
@ -33,6 +39,7 @@ bool ActionFrames::_exec(LARGE_INTEGER nNow)
|
||||||
m_nLast.QuadPart = nNow.QuadPart - (nNow.QuadPart % m_nAnimationInterval.QuadPart);
|
m_nLast.QuadPart = nNow.QuadPart - (nNow.QuadPart % m_nAnimationInterval.QuadPart);
|
||||||
m_pParent->setImage(m_vFrames[m_nFrameIndex]);
|
m_pParent->setImage(m_vFrames[m_nFrameIndex]);
|
||||||
m_nFrameIndex++;
|
m_nFrameIndex++;
|
||||||
|
// 判断动作是否结束
|
||||||
if (m_nFrameIndex == m_vFrames.size())
|
if (m_nFrameIndex == m_vFrames.size())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -55,9 +62,9 @@ void ActionFrames::addFrame(Image * frame)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionFrames * ActionFrames::copy()
|
ActionFrames * ActionFrames::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionFrames();
|
auto a = new ActionFrames(this->m_nMilliSeconds);
|
||||||
for (auto f : m_vFrames)
|
for (auto f : m_vFrames)
|
||||||
{
|
{
|
||||||
a->addFrame(f);
|
a->addFrame(f);
|
||||||
|
|
@ -67,8 +74,7 @@ ActionFrames * ActionFrames::copy()
|
||||||
|
|
||||||
ActionFrames * ActionFrames::reverse() const
|
ActionFrames * ActionFrames::reverse() const
|
||||||
{
|
{
|
||||||
auto a = new ActionFrames();
|
auto a = this->copy();
|
||||||
a->m_vFrames = this->m_vFrames;
|
|
||||||
a->m_vFrames.reserve(m_vFrames.size());
|
a->m_vFrames.reserve(m_vFrames.size());
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ bool ActionMoveBy::_exec(LARGE_INTEGER nNow)
|
||||||
m_pParent->setPos(int(m_BeginPos.x + m_MoveVector.x * scale),
|
m_pParent->setPos(int(m_BeginPos.x + m_MoveVector.x * scale),
|
||||||
int(m_BeginPos.y + m_MoveVector.y * scale));
|
int(m_BeginPos.y + m_MoveVector.y * scale));
|
||||||
// 判断动作是否结束
|
// 判断动作是否结束
|
||||||
if (m_nDuration >= m_nTotalDuration)
|
if (_isEnd())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -42,11 +42,9 @@ void ActionMoveBy::_reset()
|
||||||
Animation::_reset();
|
Animation::_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionMoveBy * ActionMoveBy::copy()
|
ActionMoveBy * ActionMoveBy::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionMoveBy(*this);
|
return new ActionMoveBy(m_nMilliSeconds / 1000.0f, m_MoveVector);
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionMoveBy * ActionMoveBy::reverse() const
|
ActionMoveBy * ActionMoveBy::reverse() const
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,9 @@ ActionMoveTo::~ActionMoveTo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionMoveTo * ActionMoveTo::copy()
|
ActionMoveTo * ActionMoveTo::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionMoveTo(*this);
|
return new ActionMoveTo(m_nMilliSeconds / 1000.0f, m_EndPos);
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionMoveTo::_init()
|
void ActionMoveTo::_init()
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ ActionNeverStop::~ActionNeverStop()
|
||||||
SAFE_RELEASE(m_Action);
|
SAFE_RELEASE(m_Action);
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionNeverStop * ActionNeverStop::copy()
|
ActionNeverStop * ActionNeverStop::copy() const
|
||||||
{
|
{
|
||||||
return new ActionNeverStop(m_Action->copy());
|
return new ActionNeverStop(m_Action->copy());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ bool ActionOpacityBy::_exec(LARGE_INTEGER nNow)
|
||||||
// 移动 Sprite
|
// 移动 Sprite
|
||||||
m_pParent->setOpacity(m_nBeginVal + m_nVariation * scale);
|
m_pParent->setOpacity(m_nBeginVal + m_nVariation * scale);
|
||||||
// 判断动作是否结束
|
// 判断动作是否结束
|
||||||
if (m_nDuration >= m_nTotalDuration)
|
if (_isEnd())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -41,11 +41,9 @@ void ActionOpacityBy::_reset()
|
||||||
Animation::_reset();
|
Animation::_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionOpacityBy * ActionOpacityBy::copy()
|
ActionOpacityBy * ActionOpacityBy::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionOpacityBy(*this);
|
return new ActionOpacityBy(m_nMilliSeconds / 1000.0f, m_nVariation);
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionOpacityBy * ActionOpacityBy::reverse() const
|
ActionOpacityBy * ActionOpacityBy::reverse() const
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,9 @@ ActionOpacityTo::~ActionOpacityTo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionOpacityTo * ActionOpacityTo::copy()
|
ActionOpacityTo * ActionOpacityTo::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionOpacityTo(*this);
|
return new ActionOpacityTo(m_nMilliSeconds / 1000.0f, m_nEndVal);
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionOpacityTo::_init()
|
void ActionOpacityTo::_init()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ bool ActionScaleBy::_exec(LARGE_INTEGER nNow)
|
||||||
// 移动 Sprite
|
// 移动 Sprite
|
||||||
m_pParent->setScale(m_nBeginScaleX + m_nVariationX * scale, m_nBeginScaleX + m_nVariationX * scale);
|
m_pParent->setScale(m_nBeginScaleX + m_nVariationX * scale, m_nBeginScaleX + m_nVariationX * scale);
|
||||||
// 判断动作是否结束
|
// 判断动作是否结束
|
||||||
if (m_nDuration >= m_nTotalDuration)
|
if (_isEnd())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -43,11 +43,9 @@ void ActionScaleBy::_reset()
|
||||||
Animation::_reset();
|
Animation::_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionScaleBy * ActionScaleBy::copy()
|
ActionScaleBy * ActionScaleBy::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionScaleBy(*this);
|
return new ActionScaleBy(m_nMilliSeconds / 1000.0f, m_nVariationX, m_nVariationY);
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionScaleBy * ActionScaleBy::reverse() const
|
ActionScaleBy * ActionScaleBy::reverse() const
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,9 @@ ActionScaleTo::~ActionScaleTo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionScaleTo * ActionScaleTo::copy()
|
ActionScaleTo * ActionScaleTo::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionScaleTo(*this);
|
return new ActionScaleTo(m_nMilliSeconds / 1000.0f, m_nEndScaleX, m_nEndScaleY);
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionScaleTo::_init()
|
void ActionScaleTo::_init()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
#include "..\easy2d.h"
|
#include "..\easy2d.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
ActionSequence::ActionSequence() :
|
||||||
|
m_nActionIndex(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
ActionSequence::ActionSequence(int number, Action * action1, ...) :
|
ActionSequence::ActionSequence(int number, Action * action1, ...) :
|
||||||
m_nActionIndex(0)
|
m_nActionIndex(0)
|
||||||
{
|
{
|
||||||
|
|
@ -9,9 +14,7 @@ ActionSequence::ActionSequence(int number, Action * action1, ...) :
|
||||||
|
|
||||||
while (number > 0)
|
while (number > 0)
|
||||||
{
|
{
|
||||||
Action* arg = va_arg(params, Action*);
|
this->addAction(va_arg(params, Action*));
|
||||||
arg->retain();
|
|
||||||
m_vActions.push_back(arg);
|
|
||||||
number--;
|
number--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -64,26 +67,37 @@ void ActionSequence::_reset()
|
||||||
m_nActionIndex = 0;
|
m_nActionIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionSequence * ActionSequence::copy()
|
void ActionSequence::addAction(Action * action)
|
||||||
{
|
{
|
||||||
auto a = new ActionSequence(*this);
|
m_vActions.push_back(action);
|
||||||
a->_reset();
|
action->retain();
|
||||||
|
}
|
||||||
|
|
||||||
|
ActionSequence * ActionSequence::copy() const
|
||||||
|
{
|
||||||
|
auto a = new ActionSequence();
|
||||||
|
for (auto action : m_vActions)
|
||||||
|
{
|
||||||
|
a->addAction(action->copy());
|
||||||
|
}
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionSequence * ActionSequence::reverse() const
|
ActionSequence * ActionSequence::reverse(bool actionReverse) const
|
||||||
{
|
{
|
||||||
// 复制一个相同的动作
|
auto a = new ActionSequence();
|
||||||
auto a = new ActionSequence(*this);
|
|
||||||
a->_reset();
|
|
||||||
a->m_bRunning = true;
|
|
||||||
a->m_bStop = false;
|
|
||||||
// 将动作顺序逆序排列
|
|
||||||
a->m_vActions.reserve(m_vActions.size());
|
|
||||||
// 将所有动作逆向运行
|
|
||||||
for (auto action : a->m_vActions)
|
for (auto action : a->m_vActions)
|
||||||
{
|
{
|
||||||
action->reverse();
|
if (actionReverse)
|
||||||
|
{
|
||||||
|
a->addAction(action->reverse());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
a->addAction(action->copy());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// ½«¶¯×÷˳ÐòÄæÐòÅÅÁÐ
|
||||||
|
a->m_vActions.reserve(m_vActions.size());
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
@ -14,16 +14,21 @@ ActionTwo::~ActionTwo()
|
||||||
SAFE_RELEASE(m_SecondAction);
|
SAFE_RELEASE(m_SecondAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionTwo * ActionTwo::copy()
|
ActionTwo * ActionTwo::copy() const
|
||||||
{
|
{
|
||||||
auto a = new ActionTwo(*this);
|
return new ActionTwo(m_FirstAction->copy(), m_SecondAction->copy());
|
||||||
a->_reset();
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ActionTwo * ActionTwo::reverse() const
|
ActionTwo * ActionTwo::reverse(bool actionReverse) const
|
||||||
{
|
{
|
||||||
return new ActionTwo(m_SecondAction->copy(), m_FirstAction->copy());
|
if (actionReverse)
|
||||||
|
{
|
||||||
|
return new ActionTwo(m_SecondAction->reverse(), m_FirstAction->reverse());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new ActionTwo(m_SecondAction->copy(), m_FirstAction->copy());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionTwo::_init()
|
void ActionTwo::_init()
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@ Animation::~Animation()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Animation::_isEnd() const
|
||||||
|
{
|
||||||
|
return m_nDuration >= m_nTotalDuration;
|
||||||
|
}
|
||||||
|
|
||||||
void Animation::_init()
|
void Animation::_init()
|
||||||
{
|
{
|
||||||
// 记录当前时间
|
// 记录当前时间
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "..\easy2d.h"
|
#include "..\easy2d.h"
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
static std::vector<Action*> s_vActions;
|
static std::vector<Action*> s_vActions;
|
||||||
|
|
||||||
|
|
@ -28,9 +29,14 @@ void ActionManager::addAction(Action * action)
|
||||||
{
|
{
|
||||||
if (action)
|
if (action)
|
||||||
{
|
{
|
||||||
action->_init();
|
#ifdef _DEBUG
|
||||||
|
for (auto a : s_vActions)
|
||||||
|
{
|
||||||
|
assert(a != action);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
s_vActions.push_back(action);
|
s_vActions.push_back(action);
|
||||||
action->retain();
|
action->_init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1044,7 +1044,7 @@ public:
|
||||||
void pause();
|
void pause();
|
||||||
void stop();
|
void stop();
|
||||||
void setInterval(UINT ms);
|
void setInterval(UINT ms);
|
||||||
virtual Action * copy() = 0;
|
virtual Action * copy() const = 0;
|
||||||
virtual Action * reverse() const;
|
virtual Action * reverse() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -1073,6 +1073,7 @@ protected:
|
||||||
UINT m_nTotalDuration;
|
UINT m_nTotalDuration;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
bool _isEnd() const;
|
||||||
virtual void _init() override;
|
virtual void _init() override;
|
||||||
virtual bool _exec(LARGE_INTEGER nNow) override;
|
virtual bool _exec(LARGE_INTEGER nNow) override;
|
||||||
virtual void _reset() override;
|
virtual void _reset() override;
|
||||||
|
|
@ -1085,7 +1086,7 @@ public:
|
||||||
ActionMoveBy(float duration, CVector vec);
|
ActionMoveBy(float duration, CVector vec);
|
||||||
virtual ~ActionMoveBy();
|
virtual ~ActionMoveBy();
|
||||||
|
|
||||||
virtual ActionMoveBy * copy() override;
|
virtual ActionMoveBy * copy() const override;
|
||||||
virtual ActionMoveBy * reverse() const override;
|
virtual ActionMoveBy * reverse() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -1105,7 +1106,7 @@ public:
|
||||||
ActionMoveTo(float duration, CPoint pos);
|
ActionMoveTo(float duration, CPoint pos);
|
||||||
virtual ~ActionMoveTo();
|
virtual ~ActionMoveTo();
|
||||||
|
|
||||||
virtual ActionMoveTo * copy() override;
|
virtual ActionMoveTo * copy() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CPoint m_EndPos;
|
CPoint m_EndPos;
|
||||||
|
|
@ -1122,7 +1123,7 @@ public:
|
||||||
ActionScaleBy(float duration, float scaleX, float scaleY);
|
ActionScaleBy(float duration, float scaleX, float scaleY);
|
||||||
virtual ~ActionScaleBy();
|
virtual ~ActionScaleBy();
|
||||||
|
|
||||||
virtual ActionScaleBy * copy() override;
|
virtual ActionScaleBy * copy() const override;
|
||||||
virtual ActionScaleBy * reverse() const override;
|
virtual ActionScaleBy * reverse() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -1144,7 +1145,7 @@ public:
|
||||||
ActionScaleTo(float duration, float scaleX, float scaleY);
|
ActionScaleTo(float duration, float scaleX, float scaleY);
|
||||||
virtual ~ActionScaleTo();
|
virtual ~ActionScaleTo();
|
||||||
|
|
||||||
virtual ActionScaleTo * copy() override;
|
virtual ActionScaleTo * copy() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_nEndScaleX;
|
float m_nEndScaleX;
|
||||||
|
|
@ -1162,7 +1163,7 @@ public:
|
||||||
ActionOpacityBy(float duration, float opacity);
|
ActionOpacityBy(float duration, float opacity);
|
||||||
virtual ~ActionOpacityBy();
|
virtual ~ActionOpacityBy();
|
||||||
|
|
||||||
virtual ActionOpacityBy * copy() override;
|
virtual ActionOpacityBy * copy() const override;
|
||||||
virtual ActionOpacityBy * reverse() const override;
|
virtual ActionOpacityBy * reverse() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -1182,7 +1183,7 @@ public:
|
||||||
ActionOpacityTo(float duration, float opacity);
|
ActionOpacityTo(float duration, float opacity);
|
||||||
virtual ~ActionOpacityTo();
|
virtual ~ActionOpacityTo();
|
||||||
|
|
||||||
virtual ActionOpacityTo * copy() override;
|
virtual ActionOpacityTo * copy() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_nEndVal;
|
float m_nEndVal;
|
||||||
|
|
@ -1213,8 +1214,8 @@ public:
|
||||||
ActionTwo(Action * actionFirst, Action * actionSecond);
|
ActionTwo(Action * actionFirst, Action * actionSecond);
|
||||||
virtual ~ActionTwo();
|
virtual ~ActionTwo();
|
||||||
|
|
||||||
virtual ActionTwo * copy() override;
|
virtual ActionTwo * copy() const override;
|
||||||
virtual ActionTwo * reverse() const override;
|
virtual ActionTwo * reverse(bool actionReverse = true) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Action * m_FirstAction;
|
Action * m_FirstAction;
|
||||||
|
|
@ -1230,11 +1231,13 @@ class ActionSequence :
|
||||||
public Action
|
public Action
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
ActionSequence();
|
||||||
ActionSequence(int number, Action * action1, ...);
|
ActionSequence(int number, Action * action1, ...);
|
||||||
virtual ~ActionSequence();
|
virtual ~ActionSequence();
|
||||||
|
|
||||||
virtual ActionSequence * copy() override;
|
void addAction(Action * action);
|
||||||
virtual ActionSequence * reverse() const override;
|
virtual ActionSequence * copy() const override;
|
||||||
|
virtual ActionSequence * reverse(bool actionReverse = true) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UINT m_nActionIndex;
|
UINT m_nActionIndex;
|
||||||
|
|
@ -1253,7 +1256,7 @@ public:
|
||||||
ActionDelay(float duration);
|
ActionDelay(float duration);
|
||||||
virtual ~ActionDelay();
|
virtual ~ActionDelay();
|
||||||
|
|
||||||
virtual ActionDelay * copy() override;
|
virtual ActionDelay * copy() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void _init() override;
|
virtual void _init() override;
|
||||||
|
|
@ -1268,7 +1271,7 @@ public:
|
||||||
ActionNeverStop(Action * action);
|
ActionNeverStop(Action * action);
|
||||||
virtual ~ActionNeverStop();
|
virtual ~ActionNeverStop();
|
||||||
|
|
||||||
virtual ActionNeverStop * copy() override;
|
virtual ActionNeverStop * copy() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Action * m_Action;
|
Action * m_Action;
|
||||||
|
|
@ -1284,10 +1287,11 @@ class ActionFrames :
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ActionFrames();
|
ActionFrames();
|
||||||
|
ActionFrames(UINT frameDelay);
|
||||||
~ActionFrames();
|
~ActionFrames();
|
||||||
|
|
||||||
void addFrame(Image * frame);
|
void addFrame(Image * frame);
|
||||||
virtual ActionFrames * copy() override;
|
virtual ActionFrames * copy() const override;
|
||||||
virtual ActionFrames * reverse() const override;
|
virtual ActionFrames * reverse() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -1307,7 +1311,7 @@ public:
|
||||||
ActionCallback(const std::function<void()>& callback);
|
ActionCallback(const std::function<void()>& callback);
|
||||||
~ActionCallback();
|
~ActionCallback();
|
||||||
|
|
||||||
virtual ActionCallback * copy() override;
|
virtual ActionCallback * copy() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::function<void()> m_Callback;
|
std::function<void()> m_Callback;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue