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; } }