Пример #1
0
    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;
        }
    }
Пример #2
0
 public static void AddHealth(int amount)
 {
     // Enemy.AddHealth(amount);
     EnemyInstance.AddHealth(amount);
 }