void OnTriggerEnter(Collider other) { if (onAttack) { if ((m_colliderMask.value & 1 << other.gameObject.layer) == 1 << other.gameObject.layer) { if (other.CompareTag("BossCocoon")) { BossCocoon cocoon = other.GetComponent <BossCocoon>(); m_boss.Heal(cocoon.LifeLeach(m_leachAmount * 10)); } else { LivingEntity entity = other.GetComponent <LivingEntity>(); entity.TakeDirectDamage(m_leachAmount); m_boss.Heal(entity.LastDamage); } } } }
/// <summary> /// Start boss interphase. The Mother becomes invincible and go regenrate by eating a cocoon. /// Apply some extra boost and effects. /// </summary> void StartInterphase() { if (!m_interphase) { m_interphase = true; EnrageMinions(); GameController.NotifyPlayer("The Mother calls for retribution !", Color.red, 2); invincible = true; pathfinder.speed = pathfinder.speed + 1f; BoostCocoons(); if (m_cocoons != null && m_cocoons.Count > 0) { BossCocoon cocoon = m_cocoons[0]; LockTarget(cocoon.transform); m_cocoons.RemoveAt(0); } } }