Beispiel #1
0
    public void Redraw()
    {
        if (playerScript.data.health <= 0)
        {
            playerScript.data.health = 0;

            //GameObject player = GameObject.Find("player");
            //playerControl playerScript = player.GetComponent<playerControl>();
            playerScript.GoToDeadState();
            //Debug.Log("Got rekt2");
            //return new PlayerDeath(player);
        }
        healthBar.fillAmount = playerScript.data.health / healthMax;
    }