Ejemplo n.º 1
0
    public void TakeDamage(int amount)
    {
        playerHealth -= amount;

        Debug.Assert(heartGroup != null, "Error: heartGroup cannot be null on " + this);
        if (partyLeader == true)
        {
            heartGroup.updateHeart(playerHealth);
        }

        if (playerHealth <= 0 && partyLeader == true)
        {
            Debug.Log("Game Over");
        }
    }