コード例 #1
0
ファイル: Game.cs プロジェクト: rfrfrf/SokoSolve-Sokoban
 /// <summary>
 /// Capture logic events
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gameUI_OnGameEvents(object sender, NotificationEvent e)
 {
 }
コード例 #2
0
ファイル: Game.cs プロジェクト: rfrfrf/SokoSolve-Sokoban
 /// <summary>
 /// What to do when the puzzle is completed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void gameUI_OnGameWin(object sender, NotificationEvent e)
 {
     switch(e.Command)
     {
         case ("Next"): PuzzleCompletedNext(); return;
         case ("Cancel"): PuzzleCompletedCancel(); return;
         case ("Save"): PuzzleCompletedSave(); return;
         case ("Home"): PuzzleCompletedExit(); return;
     }
     throw new NotImplementedException();
 }
コード例 #3
0
ファイル: GameUI.cs プロジェクト: rfrfrf/SokoSolve-Sokoban
 /// <summary>
 /// Allow 'friend' classes to send a common notification event
 /// </summary>
 /// <param name="e"></param>
 protected internal void FireNotificationEvent(NotificationEvent e)
 {
     if (OnGameEvents != null)
     {
         OnGameEvents(this, e);
     }
 }