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