Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Hacker : MonoBehaviour
- //GameState
- int level;
- enum Screen { MainMenu, Password, Win };
- Screen currentScreen;
- string password;
- // Start is called before the first frame update
- void Start()
- void ShowMainMenu()
- {
- currentScreen = Screen.MainMenu;
- Terminal.ClearScreen();
- Terminal.WriteLine("What would you like to hack?");
- Terminal.WriteLine("Press 1 for Neighbour's Wifi");
- Terminal.WriteLine("Press 2 for Local Police Station");
- Terminal.WriteLine("Press 3 for Pentagon");
- Terminal.WriteLine("Enter your selection");
- void OnUserInput(string input)
- {
- RunMainMenu(input)
- }
- else if (currentScreen == Screen.Password)
- {
- CheckPassword(Input);
- }
- }
- void RunMainMenu(string input)
- {
- if (input == "1")
- {
- level = 1;
- password = "test1";
- StartGame();
- }
- else if (input == "2")
- {
- level =2;
- password = "test2"
- StartGame();
- }
- else if (input == "egg")
- void StartGame()
- Terminal.WriteLine("You have chosen level " + level);
- Terminal.WriteLine("Please enter your password: ");
- }
- void CheckPassword(string input)
- {
- if (input == password)
- {
- Terminal.WriteLine("Nice one!");
- }
- else
- }
- Terminal.WriteLine("Sorry, Wrong Password ;(");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement