示例#1
0
 public override void HandleInput(InputState input)
 {
     if (input.IsMenuDown())
     {
         selected++;
         if (selected >= menuItems.Count)
         {
             selected = 0;
         }
     }
     if (input.IsMenuUp())
     {
         selected--;
         if (selected < 0)
         {
             selected = menuItems.Count - 1;
         }
     }
     if (input.IsMenuSelect())
     {
         OnSelectEntry(selected);
     }
     if (input.IsMenuCancel())
     {
         OnCancel();
     }
 }
示例#2
0
 public override void HandleInput(InputState input)
 {
     if (input.IsPause() && isPaused == false)
     {
         ScreenManager.AddScreen(new PauseScreen(this));
         isPaused = true;
     }
 }
示例#3
0
 public virtual void HandleInput(InputState input)
 {
 }