public void BufferOrder(Order Order, TurnInfo TurnInfo) { if (!_RecurringOrderBuffer.ContainsKey(TurnInfo)) { _RecurringOrderBuffer.Add(TurnInfo, new List <Order>()); } List <Order> orders = _RecurringOrderBuffer[TurnInfo]; if (!orders.Contains(Order)) { orders.Add(Order); } }
void OnUnitRightClick(object sender, MouseEventArgs e) { TurnInfo phase = Match.GetTurn().TurnInfo; if (AllowedArmies.Contains(phase.Army)) { if (Keyboard.IsKeyPressed(Keyboard.Key.LShift)) { _Controllers[phase.TurnComponent].HandleUnitShiftRightClick(((UnitView)sender).Unit); } else { _Controllers[phase.TurnComponent].HandleUnitRightClick(((UnitView)sender).Unit); } } }
public void DoTurn(Turn Turn) { TurnComponent t = AllowedArmies.Contains(Turn.TurnInfo.Army) ? Turn.TurnInfo.TurnComponent : TurnComponent.SPECTATE; _MatchScreen.SetEnabled(AllowedArmies.Contains(Turn.TurnInfo.Army)); if (_CurrentTurn.Army != null && _Controllers.ContainsKey(_CurrentTurn.TurnComponent)) { _Controllers[_CurrentTurn.TurnComponent].End(); Clear(); UnHighlight(); SelectUnit(null); _MatchScreen.PaneLayer.Clear(); } _CurrentTurn = Turn.TurnInfo; if (_Controllers.ContainsKey(t)) { _Controllers[t].Begin(); } }
void OnKeyPressed(object Sender, KeyPressedEventArgs E) { TurnInfo phase = Match.GetTurn().TurnInfo; if (AllowedArmies.Contains(phase.Army)) { switch (E.Key) { case Keyboard.Key.O: var objectivePane = new VictoryConditionPane(phase.Army.Match, _MatchScreen.FactionRenderer); objectivePane.OnClose += (sender, e) => Clear(); SetPane(objectivePane); break; case Keyboard.Key.S: HighlightEnemyFieldOfSight(phase.Army.Configuration.Team); break; case Keyboard.Key.V: HighlightVictoryConditionField(phase.Army); break; case Keyboard.Key.Num1: HighlightScore(ScoreByThreat()); break; case Keyboard.Key.Num2: HighlightScore(ScoreByPotential); break; case Keyboard.Key.Num3: HighlightScore(ScoreByFavorability()); break; default: _Controllers[phase.TurnComponent].HandleKeyPress(E.Key); break; } } }
public NextPhaseOrder(TurnInfo Turn) : this(Turn.Army, Turn.TurnComponent) { }
public void BufferOrder(Order Order, TurnInfo TurnInfo) { _MultiTurnAutomater.BufferOrder(Order, TurnInfo); }