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