Пример #1
0
    public void Die()
    {
        //Go to level spawn
        Level_Controller _levelController = gameController.GetLevelController(gameController.sceneName);

        if (_levelController != null)
        {
            _levelController.SpawnPlayer(this.gameObject);
        }
        else
        {
            Debug.Log("No Level Controller in this scene please add one");
        }
    }
Пример #2
0
    public void Die()
    {
        //check if player has already died

        infoText.text = "You Died";
        //Go to level spawn
        Level_Controller _levelController = gameController.GetLevelController(currentScene.name);

        if (_levelController != null)
        {
            _levelController.SpawnPlayer(this.gameObject);
        }
        else
        {
            print("No Level Controller in this scene please add one");
        }
        //reset health to full
        healthScript.Reset();
    }