class Program
{
static void Main(string[] args)
{
Timer timer = new Timer();
timer.Interval = 100;
Render boy = new Render();
timer.Elapsed += boy.ShowMenu;
timer.Start();
while (true)
{
ConsoleKey key1 = Console.ReadKey().Key;
if (key1 == ConsoleKey.Enter)
{
break;
}
else if (key1 == ConsoleKey.UpArrow)
{
boy.str = ">>New Game<<\n Quit Game";
continue;
}
else if (key1 == ConsoleKey.DownArrow)
{
boy.str = " New Game\n>>Quit Game<<";
continue;
}
}
Console.ReadKey();
}
}
class Render
{
public string str = ">>New Game<<\n Quit Game";
internal void ShowMenu(object sender, ElapsedEventArgs e)
{
Console.Clear();
Console.WriteLine(str);
}
}
}
纯瞎写,哈哈