Esempio n. 1
0
    void Rewind()
    {
        if (pointsInTime.Count > 1)
        {
            PointInTime pointInTime = pointsInTime.First.Value;
            transform.position = pointInTime.position;
            transform.rotation = pointInTime.rotation;
            inst.ChangeHP(pointInTime.health - inst._currentHP);
            pointsInTime.RemoveFirst();

            inst.ChangeEnergy(-RewindCost);
        }
        else
        {
            StopRewind();
        }
    }