Exemple #1
0
    public void ResetPlayer()
    {
        //--called when the round begins again - also on the 1st round
        Debug.Log("Reset " + transform.name);

        alive = true;
        gameObject.SetActive(true);
        DamageController.ResetDamage();
        health = initialHealth;
        ShootController.ResetFireRate();

        Invoke("CancelAutopilot", 2);

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

        PlayerAbility.ResetAbility();
        PlayerMovement.MoveToStartPos();
        StartAutopilot();
    }