Exemple #1
0
    private void Rewind()
    {
        if (!_currentRewoundState.UndoComplete())
        {
            if (!_wasOnPoweredSteel)
            {
                if (_currentRewoundState.WasOnPoweredSteel())
                {
                    _wasOnPoweredSteel = true;
                }
            }
            else
            {
                _currentRewoundState.ModifySpeed();
            }

            _currentRewoundState.Undo();
        }
        else if (_states.Count > 0)
        {
            _player.UpdateRewindUI(_maxStates, _states.Count);
            _currentRewoundState = _states.Pop();
        }
        else
        {
            RewindFinished();
        }
    }