Exemplo n.º 1
0
    IEnumerator BeforeRespawn(Transform lastCheckpoint)
    {
        playerSprite.enabled  = false;
        camera_Follow.enabled = false;

        yield return(new WaitForSeconds(0.2f));

        systems.FullHealth();

        transform.position = new Vector3(lastCheckpoint.position.x, lastCheckpoint.position.y, lastCheckpoint.position.z);

        playerSprite.enabled  = true;
        camera_Follow.enabled = true;
    }