Took my Boot/menu design a bit further as I’m not a beginner but not an expert either ^^. My code is below (simpel)
bool boot = true;
int stage = 0;
bool menu = false;
// Use this for initialization
void Start () {
InvokeRepeating("startProcess", 0.5f, 2f);
}
void startProcess()
{
if (boot == true)
{
switch (stage)
{
case 0:
Terminal.ClearScreen();
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine(" Booting Hacking Terminal");
Terminal.WriteLine("");
Terminal.WriteLine(" 0%");
Terminal.WriteLine("[ ]");
break;
case 1:
Terminal.ClearScreen();
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine(" Booting Hacking Terminal");
Terminal.WriteLine("");
Terminal.WriteLine(" 25%");
Terminal.WriteLine("[--------- ]");
break;
case 2:
Terminal.ClearScreen();
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine(" Booting Hacking Terminal");
Terminal.WriteLine("");
Terminal.WriteLine(" 50%");
Terminal.WriteLine("[------------------ ]");
break;
case 3:
Terminal.ClearScreen();
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine(" Booting Hacking Terminal");
Terminal.WriteLine("");
Terminal.WriteLine(" 75%");
Terminal.WriteLine("[--------------------------- ]");
break;
case 5:
Terminal.ClearScreen();
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine(" Sucessfully Booted!");
Terminal.WriteLine("");
Terminal.WriteLine(" 100%");
Terminal.WriteLine("[------------------------------------]");
Terminal.WriteLine("");
Terminal.WriteLine(" Detected a cyber Attack!");
break;
case 6:
Terminal.ClearScreen();
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine("");
Terminal.WriteLine(" Initialising cyber defense!");
Terminal.WriteLine(" ");
Terminal.WriteLine(" Protocol Alpha activated!");
Terminal.WriteLine("");
boot = false;
break;
}
stage++;
if(boot == false)
menu = true;
} else if (menu == true){
Terminal.ClearScreen();
Terminal.WriteLine("Protocol Alpha Status: active");
Terminal.WriteLine("");
Terminal.WriteLine("Press 1 to shutdown the local network [EASY]");
Terminal.WriteLine("Press 2 to block the compromised part of your network [MEDIUM]");
Terminal.WriteLine("Press 3 to counterattack [HARD]");
Terminal.WriteLine("");
Terminal.WriteLine("Choose your Action!");
}
}