Esempio n. 1
0
        private Range2 GetFacilityRange(Facility facility)
        {
            var rangeX       = new Range(facility.Left, facility.Left + Universe.Game.FacilityWidth);
            var rangeY       = new Range(facility.Top, facility.Top + Universe.Game.FacilityHeight);
            var factoryRange = new Range2(rangeX, rangeY);

            return(factoryRange);
        }
Esempio n. 2
0
 public Squad(Queue <IMoveAction> actions, List <Squad> squadList, int id, Range2 range2)
 {
     Id = id;
     actions.ActionSelectInRange(range2);
     actions.ActionAssignSelectionToSquad(id);
     squadList.Add(this);
     IsCreated = false;
     IsEnabled = true;
     UpdateLastCallTime(MyStrategy.Universe.World.TickIndex);
 }
Esempio n. 3
0
 public static void ActionSelectInRange(this Queue <IMoveAction> moveActions, Range2 range2) =>
 moveActions.Enqueue(new ActionSelectInRange(range2));
Esempio n. 4
0
 public ActionSelectInRange(Range2 range)
 {
     this.range = range;
 }
Esempio n. 5
0
 public static bool IsInRange2(this AbsolutePosition position, Range2 range) =>
 Geom.Between(range.XMin, range.XMax, position.X) && Geom.Between(range.YMin, range.YMax, position.Y);