示例#1
0
 public void AttemptToRemoveEntity(GameObject ObjectToRemove)
 {
     if (LockedTargets.Contains(ObjectToRemove))
     {
         LockedTargets.Remove(ObjectToRemove);
         LockedEntities.Remove(ObjectToRemove);
     }
     else if (LockedEntities.Contains(ObjectToRemove))
     {
         LockedEntities.Remove(ObjectToRemove);
     }
     else if (LockedMissiles.Contains(ObjectToRemove))
     {
         LockedMissiles.Remove(ObjectToRemove);
     }
 }
示例#2
0
 protected override void AddNewEntity(EnergySignal TargetES)
 {
     if (!LockedEntities.Contains(TargetES.gameObject))
     {
         if (MyEnergySignal.GetEnemyFactions.Contains(TargetES.GetTeamSignal))
         {
             if (TargetES.MySignalType == EnergySignal.SignalObjectType.Missile)
             {
                 LockedMissiles.Add(TargetES.gameObject);
             }
             else
             {
                 LockedEntities.Add(TargetES.gameObject);
                 LockedTargets.Add(TargetES.gameObject);
             }
         }
         else if (TargetES.MySignalType != EnergySignal.SignalObjectType.Missile)
         {
             LockedEntities.Add(TargetES.gameObject);
         }
     }
 }