private void OnTriggerEnter(Collider other) { BossStates boss = other.GetComponent <BossStates>(); if (boss) { HealthSystem bossHealth = boss.GetComponent <HealthSystem>(); if (bossHealth && canTakeDamage) { bossHealth.Damage(50); } } }
/// <summary> /// Reference the override onstart /// </summary> /// <param name="boss"></param> virtual public void OnStart(BossStates boss) { this.boss = boss; }