OnuserInput not working

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Hacker : MonoBehaviour
{
int level;

void Start()
{
    ShowMainMenu();
    
}

void ShowMainMenu()
{
    Terminal.ClearScreen();
    Terminal.WriteLine("What would you like to hack into?");
    Terminal.WriteLine("Press 1 for the local library");
    Terminal.WriteLine("Press 2 for the police station");
}


 void OnuserInput(string input)
{
    if(input == "menu")
    {
        ShowMainMenu();
    }

    else if(input == "1")
    {
        level = 1;
        StartGames();
    }
    else
    {
        Terminal.WriteLine("Select Valid VCalue");
    }
}

void StartGames()
{
    Terminal.WriteLine("You Select Level" + level);
}

}

Make sure to use upper caps “OnUserInput” and not “Onuserinput” :wink:

Privacy & Terms