我正在 C# 控制台中开发一个用于作业的游戏。我在 ASCII 艺术中对游戏的开始做了一种介绍。我想要的是显示这段代码5秒钟,然后进入游戏。
我搜索了信息并尝试了Console.Clear()
但不接受TimeSpan
参数。
我不是要你做我的工作,而是寻求指导来做这件事。
我留下 ASCII 艺术的代码,壁纸取自 CM Punk “Best in the World”。
class Programa
{
static void Main()
{
// BEST IN THE WORLD!!!!
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(" Z");
Console.WriteLine(" Z=");
Console.ResetColor();
Console.Write("++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("MZZ.");
Console.ResetColor();
Console.WriteLine("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.Write("++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("$ZZ:.");
Console.ResetColor();
Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.Write("++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".ZZZZ:.");
Console.ResetColor();
Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.Write("++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".ZZZZZ:.");
Console.ResetColor();
Console.WriteLine("++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.Write("++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".ZZZZZZZ:.");
Console.ResetColor();
Console.WriteLine("++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.Write("++++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".ZZZZZZZZZ:.");
Console.ResetColor();
Console.WriteLine("++++++++++++++++++++++++++++++++++++++++++++++++");
Console.Write("++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".zZZZZZZZZZZZ:.");
Console.ResetColor();
Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(" zZZZZZZZZ:.");
Console.WriteLine(" zZZZZZ$ZZ:..:7ZZZZZ7$. ");
Console.WriteLine(" zZZZZZ. .7. .$$ZZz ");
Console.WriteLine(" zZZZ+: :Z ZZ$ ");
Console.WriteLine(" * * zZZZZz Z Z$Z$ * * ");
Console.WriteLine("* * * * * * zZZZZZZZ Z$ ZZ * * * * * * ");
Console.WriteLine(" ******* ******* ZZZ:ZZ.:Z: Z Zz ******* ******* ");
Console.WriteLine(" ***** **** ZZ+ZZZZ. Z7Z$ZZZ: ***** ***** ");
Console.WriteLine(" ******* ******* $ZZZI $Z$$$ZZZZ, ******* ******* ");
Console.WriteLine("* * * * * * ZZZZZZ Z$ ZZ ZZZZ:.* * * * * * ");
Console.WriteLine(" * * zIO,, :7Z$ 7ZZZZ=, * * ");
Console.WriteLine(" $ ZZO 7ZZZZ$+7 ");
Console.WriteLine(" OZO$.....Z~...7ZZZZI:ZZZZZ+$ ");
Console.WriteLine(" ZZO:...$ZI., 7ZZZZ,Z ");
Console.WriteLine(" .Z$.OI:?ZOZ, $77ZZ ");
Console.ResetColor();
Console.Write("++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".ZZZZZZZ:.");
Console.ResetColor();
Console.WriteLine("++++++++++++++++");
Console.Write("+++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".C7ZZI.");
Console.ResetColor();
Console.WriteLine("++++++++++++++++");
Console.Write("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("7ZZ:.");
Console.ResetColor();
Console.WriteLine("++++++++++++++");
Console.Write("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(".Z.");
Console.ResetColor();
Console.WriteLine("++++++++++++++");
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(" BEST IN THE WORLD");
}
}