using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hacker : MonoBehaviour {
int level;
enum Screen {MainMenu, Password, Win};
Screen currentScreen = Screen.MainMenu;
// Start is called before the first frame update
void Start()
{
showMainMenu();
}
void showMainMenu() {
Terminal.ClearScreen();
Terminal.WriteLine("Welcome to the Terminal Hacker by Meet");
Terminal.WriteLine("");
Terminal.WriteLine("Press 1 to Hack Into the Local Library");
Terminal.WriteLine("Press 2 to Hack Into the Server");
Terminal.WriteLine("Press 3 to Hack Into NASA");
Terminal.WriteLine("");
Terminal.WriteLine("Enter your Selection: ");
}
void OnUserInput(string input) {
if (input == "menu") {
showMainMenu();
}
else if(currentScreen == Screen.MainMenu)
{
RunMainMenu(input);
Terminal.WriteLine("Please choose a valid option");
}
void StartGame() {
Terminal.WriteLine("You have chosen level " + level);
}
void RunMainMenu(string input)
{
if (input == "1")
{
level = 1;
StartGame();
}
else if (input == "2")
{
level = 2;
StartGame();
}
else if (input == "3")
{
level = 3;
StartGame();
}
}
}
// Update is called once per frame
void Update()
{
}
}
Error which I am getting in unity: