I’ve tried to add some extra code.
// Start is called before the first frame update
void Start()
{
ShowMainMenu("Serbay", "Reyiz");
}
void ShowMainMenu(string name, string nickname)
{
Terminal.ClearScreen();
Terminal.WriteLine("Hello " + name + " aka " + nickname);
Terminal.WriteLine("Welcome to the Terminal Hacker!");
Terminal.WriteLine("What would you like to hack into?");
Terminal.WriteLine(" ");
Terminal.WriteLine("-----------------------------------");
Terminal.WriteLine("|Type 1 for School (easy) |");
Terminal.WriteLine("|Type 2 for Police Station (hard)|");
Terminal.WriteLine("-----------------------------------");
Terminal.WriteLine(" ");
Terminal.WriteLine("Type Below: ");
}
void ShowHelpMenu()
{
Terminal.ClearScreen();
Terminal.WriteLine("Welcome to the Help Menu");
Terminal.WriteLine(" ");
Terminal.WriteLine("I can't help you.");
Terminal.WriteLine(" ");
Terminal.WriteLine("Type 'menu' to return to the main menu.");
}
void ShowExitMenu()
{
Terminal.ClearScreen();
Terminal.WriteLine("Welcome to the Exit Menu");
Terminal.WriteLine(" ");
Terminal.WriteLine("You can't exit really.");
Terminal.WriteLine("You have to play.");
Terminal.WriteLine("Sorry about that.");
Terminal.WriteLine(" ");
Terminal.WriteLine("Type 'menu' to return to the main menu");
}
void OnUserInput(string input)
{
print("User typed " + input);
if (input == "1")
{
Terminal.ClearScreen();
Terminal.WriteLine("You Chose Type " + input);
Terminal.WriteLine("You chose to hack school");
}
else if (input == "2")
{
Terminal.ClearScreen();
Terminal.WriteLine("You Chose Type " + input);
Terminal.WriteLine("You chose to hack police station");
}
else if (input == "menu")
{
ShowMainMenu("Serbay", "Reyiz");
}
else if (input == "007")
{
Terminal.ClearScreen();
Terminal.WriteLine("Please Enter A Valid Number Mr Bond");
}
else if (input == "666")
{
Terminal.ClearScreen();
Terminal.WriteLine("Please Enter A Valid Number Satan");
}
else if (input == "help")
{
ShowHelpMenu();
}
else if (input == "exit")
{
ShowExitMenu();
}
else
{
Terminal.ClearScreen();
Terminal.WriteLine("ERROR! " + input + " is not a valid command!");
}
}