public override void DoUpdate(GameTime gameTime) { if (InputHelper.InputConfirmPressed() || MouseHelper.InputLeftButtonReleased()) { if (TransformingUnit.ArrayTransformingUnit[TransformationChoice].WillRequirement >= 0 && TransformingUnit.PilotMorale >= TransformingUnit.ArrayTransformingUnit[TransformationChoice].WillRequirement) { AddToPanelListAndSelect(new ActionPanelTranform2WingmanWill(TransformationChoice, TransformingUnit, ActiveSquad, ShowSquadMembers, Map)); } else if (TransformingUnit.ArrayTransformingUnit[TransformationChoice].TurnLimit >= 0) { AddToPanelListAndSelect(new ActionPanelTranform2WingmanTurn(TransformationChoice, TransformingUnit, ActiveSquad, ShowSquadMembers, Map)); } else { TransformingUnit.ChangeUnit(TransformationChoice); Map.UpdateSquadCurrentMovement(ActiveSquad); } Map.sndConfirm.Play(); } else if (InputHelper.InputCancelPressed() || MouseHelper.InputRightButtonReleased()) { RemoveFromPanelList(this); } else if (InputHelper.InputUpPressed()) { TransformationChoice -= (TransformationChoice > 0) ? 1 : 0; Map.sndSelection.Play(); } else if (InputHelper.InputDownPressed()) { TransformationChoice += (TransformationChoice < TransformingUnit.ArrayTransformingUnit.Length - 1) ? 1 : 0; Map.sndSelection.Play(); } }
public override void DoUpdate(GameTime gameTime) { if (InputHelper.InputConfirmPressed() || MouseHelper.InputLeftButtonReleased()) { TransformingUnit.ChangeUnit(TransformationChoice); Map.UpdateSquadCurrentMovement(ActiveSquad); Map.ActiveSquadIndex = -1; Map.sndConfirm.Play(); } else if (InputHelper.InputCancelPressed() || MouseHelper.InputRightButtonReleased()) { } }
public override void OnSelect() { TransformingUnit.ChangeUnit(TransformationChoice); Map.UpdateSquadCurrentMovement(ActiveSquad); }