protected override void Awake() { base.Awake(); specialDamage = 1.0f; normalDamageCount = specialDamagers.Count + 1; normalDamage = health / normalDamageCount; specialDamagers.Shuffle(); currDamager = "Normal"; currDamageAmount = normalDamage; bossUI = bossUIObject.GetComponent <BossHealthUI>(); bossUI.SetMaxHealth(health); }
protected override void Awake() { base.Awake(); head = (transform.parent != null) ? transform.parent.GetComponentInChildren <SnakeHead>() : GetComponent <SnakeHead>(); HealthManager[] healthArray = (transform.parent != null) ? transform.parent.GetComponentsInChildren <HealthManager>() : GetComponents <HealthManager>(); healthList = new List <HealthManager>(healthArray); GameObject temp = GameObject.FindGameObjectWithTag("LevelManager"); if (temp) { levelManager = temp.GetComponent <LevelManager>(); } healthUI = healthUIObject.GetComponent <BossHealthUI>(); maxTotalHealth = killsTillDeath * healthList[0].Health; currTotalHealth = maxTotalHealth; healthUI.SetMaxHealth(maxTotalHealth); }
// Start is called before the first frame update void Start() { startSpeed = speed; dazedTime = 0; healthBar.SetMaxHealth(health); }