mirror of https://github.com/axmolengine/axmol.git
commit
2b82c0c837
|
@ -199,22 +199,27 @@ void ActionTimeline::step(float delta)
|
|||
}
|
||||
|
||||
_time += delta * _timeSpeed;
|
||||
|
||||
if(_time < _endFrame * _frameInternal)
|
||||
{
|
||||
_currentFrame = (int)(_time / _frameInternal);
|
||||
|
||||
stepToFrame(_currentFrame);
|
||||
|
||||
if(_time > _endFrame * _frameInternal)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_lastFrameListener != nullptr)
|
||||
_lastFrameListener();
|
||||
|
||||
_playing = _loop;
|
||||
if(!_playing)
|
||||
{
|
||||
_time = _endFrame * _frameInternal;
|
||||
_currentFrame = (int)(_time / _frameInternal);
|
||||
stepToFrame(_currentFrame);
|
||||
}
|
||||
else
|
||||
gotoFrameAndPlay(_startFrame, _endFrame, _loop);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef std::function<void(Node*)> tCallBack;
|
||||
|
|
Loading…
Reference in New Issue