Exemple #1
0
 internal static void Free(ActualUnit overseer)
 {
     if (Commands.FirstOrDefault(c => c is DismissOneCommand) == null)
     {
         Commands.Add(new DismissOneCommand(overseer));
     }
 }
Exemple #2
0
 public Cluster(ActualUnit unit)
 {
     ClusterType = unit.UnitType;
     units.Add(unit);
     Id = id;
     id++;
     // Clip = new Clip(unit.Position.X, unit.Position.Y);
     Update();
 }
Exemple #3
0
 internal static void CommandStrike(Cluster target, ActualUnit overseer)
 {
     if (Strike == null)
     {
         Strike = (new StrikeCommand(target, overseer));
     }
     else
     {
         Strike.Cooldown = Me.RemainingNuclearStrikeCooldownTicks;
         Strike.Target   = target;
         Strike.Overseer = overseer;
     }
 }
Exemple #4
0
 public StrikeCommand(Cluster target, ActualUnit overseer) : base(null)
 {
     Target    = target;
     Overseer  = overseer;
     CanRemove = false;
 }
Exemple #5
0
 public DismissOneCommand(ActualUnit unit) : base(null)
 {
     Unit      = unit;
     CanRemove = false;
 }
Exemple #6
0
 internal void Add(ActualUnit unit)
 {
     units.Add(unit);
     Update();
 }
Exemple #7
0
 internal bool IsNear(ActualUnit unit)
 {
     return(unit.UnitType == ClusterType && unit.Position.DistanceTo(X, Y) <= Radius);
 }