Пример #1
0
    public void RespawnAt(Vector3 respawnPoint)
    {
        animator.SetTrigger("respawn");

        if (key)
        {
            key.Reset();
        }

        // must be called after resetting player.transform.position
        // perhaps something to fix in the future?
        gameObject.transform.position = respawnPoint;
        movement.ClearDestination();
        movement.enabled = false;

        StartCoroutine(EnableMovementAfterDelay(respawnMovementDelay));
    }