Ejemplo n.º 1
0
    // make sure the trail renderers don't emit
    IEnumerator MovePlayerNextFrame(Vector2 position)
    {
        pc.DisableTrails();
        yield return(new WaitForEndOfFrame());

        pc.transform.position = position;
        playerFollower.SnapToTarget();
        pc.EnableTrails();
        yield return(new WaitForSecondsRealtime(0.5f));

        UnFadeToBlack();
        pc.ExitCutscene();
    }
Ejemplo n.º 2
0
    // make sure the trail renderers don't emit
    IEnumerator MovePlayerNextFrame(Vector2 position, bool fade)
    {
        pc.DisableTrails();
        if (pc.speedLimiter)
        {
            pc.speedLimiter.enabled = false;
        }
        yield return(new WaitForEndOfFrame());

        pc.transform.position = position;
        playerFollower.SnapToTarget();
        pc.EnableTrails();
        if (fade)
        {
            yield return(new WaitForSecondsRealtime(0.5f));

            UnFadeToBlack();
        }
        pc.ExitCutscene();
        pc.speedLimiter.enabled = true;
    }