public void ActivateThreat(GameObject threat) { if (ActiveThreat != null) { ActiveThreat.GetComponent <Threat>().DeactivateThreat(); } ActiveThreat = threat; }
public virtual void Attack() { int threatNum = Random.Range(0, ThreatList.Length); Debug.Log($"Attacking From {name} (Threat {threatNum}/{ThreatList.Length})"); Dormant.gameObject.SetActive(false); ActiveThreat = ThreatList[Random.Range(0, ThreatList.Length)]; ActiveThreat.Activate(); }