Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace AIYou
- {
- static class TextManager
- {
- //Class used for wordwrap and anything the text may need to do, all text gets pushed through here before being printed out on the screen.
- //Set this variable to whatever data needs to be displayed.
- private static string outputBuffer;
- public static string action;
- public static void Add(string line)
- {
- //Anything that needs to be done first will be put around this, currently we just want the text to be added to the outputBuffer variable.
- outputBuffer += line + "\n";
- }
- public static void Display()
- {
- //Clear the screen each time this is written out.
- Console.Clear();
- if (action != null)
- Console.WriteLine(action);
- //Writes out any data sent to the outputBuffer variable to screen.
- Console.WriteLine(outputBuffer);
- Console.Write(">ACTION: ");
- action = Convert.ToString(Console.Read());
- outputBuffer = "";
- }
- }
- }
Add Comment
Please, Sign In to add comment