Beispiel #1
0
    protected virtual void Record()
    {
        if (StatesInTime.Count >= Mathf.Round(recordTime / Time.fixedDeltaTime))
        {
            StatesInTime.RemoveAt(StatesInTime.Count - 1);
        }

        StatesInTime.Insert(0, new StateInTime());
    }
Beispiel #2
0
    protected virtual void Rewind()
    {
        if (StatesInTime.Count > 0)
        {
            CurrentStateInTime = StatesInTime[0];

            CurrentStateInTime.ApplyState();

            StatesInTime.RemoveAt(0);
        }
        else
        {
            StopRewind();
        }
    }