예제 #1
0
 public static void RegisterSelection(this AliasUnit selected)
 {
     if (anythingSelected)
     {
         selectedUnit.Deselect();
     }
     selectedUnit = selected;
 }
예제 #2
0
 public void CheckEnemiesAround()
 {
     if (hitPoints > 0)
     {
         if (Time.timeSinceLevelLoad > nextCheck)
         {
             if (target == null || target.hitPoints <= 0)
             {
                 foreach (var o in Physics.OverlapSphere(transform.position, agressionRange))
                 {
                     if (o.tag == "Alias")
                     {
                         target = o.GetComponent <AliasUnit> ();
                         break;
                     }
                 }
             }
             ReachTarget();
             nextCheck = Time.timeSinceLevelLoad + checkDelay;
         }
     }
 }
예제 #3
0
 public static void RegisterDeselection(this AliasUnit unit)
 {
     selectedUnit = null;
 }