Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- class Program
- {
- static void Main()
- {
- string text = Console.ReadLine();
- for (int i = text.Length - 1; i >= 0; i--)
- {
- if (text[i] != ' ')
- {
- int motionSpeed = (i + 20) * 2;
- for (int pos = 0; pos <= i + 20; pos++)
- {
- Console.SetCursorPosition(pos, 10);
- Console.Write(text[i]);
- Thread.Sleep(motionSpeed);
- if (pos != i + 20)
- {
- Console.SetCursorPosition(pos, 10);
- Console.Write(" ");
- motionSpeed = motionSpeed - 2;
- }
- else
- {
- DrawImpact(10, i + 20);
- }
- }
- }
- }
- Console.WriteLine();
- }
- public static void DrawImpact(int row, int col)
- {
- Console.ForegroundColor = ConsoleColor.Yellow;
- for (int i = 1; i <= 5; i++)
- {
- Console.SetCursorPosition(col - i, row - i);
- Console.Write("\\{0}|{0}/", new string(' ', i - 1));
- Console.SetCursorPosition(col - i, row + i);
- Console.Write("/{0}|{0}\\", new string(' ', i - 1));
- Thread.Sleep(7);
- Console.SetCursorPosition(col - i, row - i);
- Console.WriteLine(new string(' ', ((i - 1)*2) + 3));
- Console.SetCursorPosition(col - i, row + i);
- Console.WriteLine(new string(' ', ((i - 1) * 2) + 3));
- }
- Console.ResetColor();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement