コード例 #1
0
ファイル: TitleMenu.cs プロジェクト: rlods/PocDotNet
 public override void tick(Game game, bool up, bool down, bool left, bool right, bool use)
 {
     if (firstTick)
     {
         firstTick = false;
         Sound.altar.play();
     }
     if (up || down) Sound.click2.play();
     if (up) selected--;
     if (down) selected++;
     if (selected < 0) selected = 0;
     if (selected >= options.Length) selected = options.Length - 1;
     if (use)
     {
         Sound.click1.play();
         if (selected == 0)
         {
             game.setMenu(null);
             game.newGame();
         }
         if (selected == 1)
         {
             game.setMenu(new InstructionsMenu());
         }
         if (selected == 2)
         {
             game.setMenu(new AboutMenu());
         }
     }
 }
コード例 #2
0
ファイル: GotLootMenu.cs プロジェクト: rlods/PocDotNet
 public override void tick(Game game, bool up, bool down, bool left, bool right, bool use)
 {
     if (tickDelay > 0) tickDelay--;
     else if (use)
     {
         game.setMenu(null);
     }
 }
コード例 #3
0
ファイル: LoseMenu.cs プロジェクト: rlods/PocDotNet
 public override void tick(Game game, bool up, bool down, bool left, bool right, bool use)
 {
     if (tickDelay > 0) tickDelay--;
     else if (use)
     {
         Sound.click1.play();
         game.setMenu(new TitleMenu());
     }
 }