示例#1
0
 public void ActivateThreat(GameObject threat)
 {
     if (ActiveThreat != null)
     {
         ActiveThreat.GetComponent <Threat>().DeactivateThreat();
     }
     ActiveThreat = threat;
 }
示例#2
0
文件: Zone.cs 项目: Eunomiac/HEX
    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();
    }