コード例 #1
0
ファイル: EnemyScript.cs プロジェクト: cs352-iap-mrn/skyfort
    public void AddHealth(int amount)
    {
        enemy.AddHealth(amount);

        if (enemy.GetHealth() < enemy.GetMaxHealth() && healthBar == null)
        {
            healthBar = Instantiate(healthBarPrefab, Game.progressCanvas.transform);
            healthBar.GetComponent <HealthScript>().healthable = enemy;
        }
    }