Beispiel #1
0
 private static void CloseWindow(Alert window, GameInfo gameInfo, IGameState waitState)
 {
     if (gameInfo.Fsm.Remove(waitState)) {
         window.Close();
     }
 }
Beispiel #2
0
 private void OfferTravel(Manager manager, GameInfo gameInfo, IGameState waitState)
 {
     // Create a window asking if the player wants to travel
     _confirmWindow = new ConfirmWindow(manager,
         String.Format("Do you want to travel to a different island?\n" +
                      "Travelling will earn you a new passport stamp\n" +
                      "Deciding to travel will end your current go\n"),
         "Travel to another island?", icon: "Images/AlertIcons/Travel");
     ((ConfirmWindow)_confirmWindow).AffirmButton.Click += (sender, args) => BeginTravel(gameInfo, waitState);
     _confirmWindow.DenyButton.Click
         += (sender, args) => { _confirmWindow.Close(); gameInfo.Fsm.Remove(waitState); };
 }