示例#1
0
        static public void CreateConfigFile()
        {
            Console.SetCursorPosition(0, 0);
            Console.Clear();
            Console.WriteLine("I am going to create a config file at " + fullFileName);
            Console.WriteLine("Press any key to continue...");
            Console.WriteLine("If you do not whish to continue press Esc");
            Console.WriteLine("If you whish to open the file press O");
            Keys a = FConsole.Convert(Console.ReadKey());

            if (a == Keys.Escape)
            {
                Console.Clear();
                return;
            }
            File.WriteAllText(fullFileName, defaultJson);
            Console.Clear();
            hasOptionFile = true;
            if (a == Keys.O)
            {
                Event_options();
            }
        }
示例#2
0
 void GameOver()
 {
     soundManager.Gameover();
     Util.SetColor(boxColor);
     MoveCursor(size.x + 1, 0);
     Console.Write("Game Over:");
     if (gameOverDelay > 0)
     {
         Thread.Sleep(gameOverDelay);
         Util.ClearKeyBuffer();
     }
     DrawMessage("Press any key to restart...");
     Console.ReadKey(true);
     DrawMessage("");
     MoveCursor(size.x + 1, 0);
     Console.Write("         :");
     Init();
 }