Ejemplo n.º 1
0
 internal static void Free(ActualUnit overseer)
 {
     if (Commands.FirstOrDefault(c => c is DismissOneCommand) == null)
     {
         Commands.Add(new DismissOneCommand(overseer));
     }
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 4
0
 public StrikeCommand(Cluster target, ActualUnit overseer) : base(null)
 {
     Target    = target;
     Overseer  = overseer;
     CanRemove = false;
 }
Ejemplo n.º 5
0
 public DismissOneCommand(ActualUnit unit) : base(null)
 {
     Unit      = unit;
     CanRemove = false;
 }
Ejemplo n.º 6
0
 internal void Add(ActualUnit unit)
 {
     units.Add(unit);
     Update();
 }
Ejemplo n.º 7
0
 internal bool IsNear(ActualUnit unit)
 {
     return(unit.UnitType == ClusterType && unit.Position.DistanceTo(X, Y) <= Radius);
 }