コード例 #1
0
ファイル: Player.cs プロジェクト: Joeriri/FPPS
    public void Damage(float damagePoints)
    {
        health -= damagePoints;
        am.Play("PlayerDamage");
        levelUI.DamageEffect();
        levelUI.UpdateHealthUI("HP: " + health.ToString());

        // De speler gaat dood
        if (health <= 0 && GameManager.Instance.gameOver != true)
        {
            GameManager.Instance.GameOver();
        }
    }