Exemplo n.º 1
0
    public void StopRewind(float elapsedTime)
    {
        if (!RewindManager.RewindStarted)
        {
            return;
        }

        RewindableScript rs = GetComponent <RewindableScript>();

        if (rs != null)
        {
            rs.WillStopRewinding(elapsedTime);
        }

        RewindManager.StopRewind();

        if (collection)
        {
            _rm.RewUnits.RemoveAll(rewindUnits.Contains);
        }
        else
        {
            _rm.RewUnits.Remove(gameObject);
        }
    }
Exemplo n.º 2
0
    public void StartRewind()
    {
        if (RewindManager.RewindStarted)
        {
            return;
        }

        RewindableScript rs = GetComponent <RewindableScript>();

        if (rs != null)
        {
            rs.WillStartRewinding();
        }

        if (collection)
        {
            _rm.RewUnits.AddRange(rewindUnits);
        }
        else
        {
            _rm.RewUnits.Add(gameObject);
        }


        RewindManager.StartRewind();
    }