Beispiel #1
0
    public void RemoveHealth(float damage)
    {
        health       -= damage;
        visualHealth -= damage; // Remove health by a given amount

        if (health <= 0)        // Kill player
        {
            deathScript.Death();
            health = 0;
        }
    }