修复上次更新后动画不同步的bug
This commit is contained in:
parent
f2923e95f6
commit
9b4100d414
|
|
@ -18,6 +18,7 @@ ActionFrames::~ActionFrames()
|
|||
{
|
||||
for (auto frame : m_vFrames)
|
||||
{
|
||||
frame->autoRelease();
|
||||
frame->release();
|
||||
}
|
||||
}
|
||||
|
|
@ -42,6 +43,7 @@ void ActionFrames::_exec(steady_clock::time_point nNow)
|
|||
if (m_nFrameIndex == m_vFrames.size())
|
||||
{
|
||||
this->stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ void ActionMoveBy::_init()
|
|||
|
||||
void ActionMoveBy::_exec(steady_clock::time_point nNow)
|
||||
{
|
||||
if (Animation::_isDelayEnough(nNow))
|
||||
while (Animation::_isDelayEnough(nNow))
|
||||
{
|
||||
// 计算移动位置
|
||||
float scale = float(m_nDuration) / m_nTotalDuration;
|
||||
|
|
@ -30,6 +30,7 @@ void ActionMoveBy::_exec(steady_clock::time_point nNow)
|
|||
if (_isEnd())
|
||||
{
|
||||
this->stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ void ActionOpacityBy::_init()
|
|||
|
||||
void ActionOpacityBy::_exec(steady_clock::time_point nNow)
|
||||
{
|
||||
if (Animation::_isDelayEnough(nNow))
|
||||
while (Animation::_isDelayEnough(nNow))
|
||||
{
|
||||
// 计算移动位置
|
||||
float scale = float(m_nDuration) / m_nTotalDuration;
|
||||
|
|
@ -29,6 +29,7 @@ void ActionOpacityBy::_exec(steady_clock::time_point nNow)
|
|||
if (_isEnd())
|
||||
{
|
||||
this->stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ void ActionScaleBy::_init()
|
|||
|
||||
void ActionScaleBy::_exec(steady_clock::time_point nNow)
|
||||
{
|
||||
if (Animation::_isDelayEnough(nNow))
|
||||
while (Animation::_isDelayEnough(nNow))
|
||||
{
|
||||
// 计算移动位置
|
||||
float scale = float(m_nDuration) / m_nTotalDuration;
|
||||
|
|
@ -31,6 +31,7 @@ void ActionScaleBy::_exec(steady_clock::time_point nNow)
|
|||
if (_isEnd())
|
||||
{
|
||||
this->stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
|||
Loading…
Reference in New Issue