public override void Update(UpdateContext context, float parentAlpha)
{
if (_needRebuild)
{
Rebuild();
}
if (_playing && frameCount != 0 && _status != 3)
{
playState.Update(this, context);
if (_currentFrame != playState.currrentFrame)
{
if (_status == 1)
{
_currentFrame = _start;
playState.currrentFrame = _currentFrame;
_status = 0;
}
else if (_status == 2)
{
_currentFrame = _endAt;
playState.currrentFrame = _currentFrame;
_status = 3;
Stage.inst.onPostUpdate.Add(__playEnd);
}
else
{
_currentFrame = playState.currrentFrame;
if (_currentFrame == _end)
{
if (_times > 0)
{
_times--;
if (_times == 0)
{
_status = 2;
}
else
{
_status = 1;
}
}
}
}
quadBatch.SetQuadAlpha(_currentFrame, 1, 1f, 0f);
}
}
quadBatch.Update(context, alpha * parentAlpha);
}