Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.CursorVisible = false;
            Console.SetWindowSize(160, 50);
            SoundPlayer typewriter = Constants.getSoundPlayerInstance();
            typewriter.SoundLocation = "mainMusic.wav";
            typewriter.PlayLooping();

             //   EndGame end = new EndGame(10);
               // end.run();
            //    Console.ReadKey();
               Menu menu = new Menu();
               menu.run();
        }
Ejemplo n.º 2
0
        private void selectedAction(int select)
        {
            switch (select)
            {
                case 0:
                    pauseMenu = false;
                    Console.Clear();
                    resumeGame(Map);
                    break;
                case 1:
                    typewriter.Stop();

                    if (typewriter.SoundLocation.CompareTo("step.wav") != 0)
                    {
                        typewriter.SoundLocation = "step.wav";
                    }

                    pauseMenu = false;
                    Console.Clear();
                    double pointsForSteps = ((double)numberSteps) * 0.1;
                    totalPoints = totalPoints - (int)pointsForSteps;
                    initMap("sokoban_" + mapNumber + ".txt", true);
                    break;
                case 2:
                    timerPauseMenu.Stop();
                    Menu menu = new Menu();
                    menu.run();
                    break;
            }
        }
Ejemplo n.º 3
0
 private void selectedAction(int select)
 {
     switch (select)
     {
         case 0:
             saveRanking(name, points);
             timerPauseMenu.Stop();
             menu = new Menu();
             menu.run();
             break;
         case 1:
             timerPauseMenu.Stop();
             menu = new Menu();
             menu.run();
             break;
     }
 }
Ejemplo n.º 4
0
        private void selectedAction(int select)
        {
            switch (select)
            {
                case 0: //arrow up
                    if(from > 0)
                    {
                        from--;
                        to--;
                        printRanking(from, to);
                    }

                    break;
                case 1: //arrow down
                    if (to < RankingItemList.Count()){
                    from++;
                    to++;
                    printRanking(from,to);
                    }
                    break;
                case 2: //back button
                  //  saveRanking();
                    Menu menu = new Menu();
                    timer.Close();
                    menu.run();
                    break;
            }
        }