// Start is called before the first frame update void Start() { control_turn = controlTrun.GetComponent <ControlTrun>(); control_bar = controlBar.GetComponent <ControlBar>(); make_chara = makeChara.GetComponent <MakeChar>(); chara_ob = make_chara.chara_ob; charas = make_chara.charas; enemy_ob = make_chara.enemy_ob; enemies = make_chara.enemies; time_all = (charas[0].getTime() + charas[1].getTime() + charas[2].getTime()); audioSource = GetComponent <AudioSource>(); }
public MakeChar(int numSelect, string charName) { int Choice = numSelect; string CharName = charName; switch (Choice) { case 1: System.Console.WriteLine("You chose to live it up as a human in a fantasy game!"); System.Console.WriteLine(Program.newLine); System.Console.ReadKey(); Human_Choices humanPlayer = new Human_Choices(charName); break; case 2: System.Console.WriteLine("You chose wizard!"); System.Console.ReadKey(); Wizard_Choices wizardPlayer = new Wizard_Choices(charName); break; case 3: System.Console.WriteLine("You chose samurai!"); System.Console.ReadKey(); Samurai_Choices samuraiPlayer = new Samurai_Choices(charName); break; case 4: System.Console.WriteLine("You chose ninja!"); System.Console.ReadKey(); Ninja_Choices ninjaPlayer = new Ninja_Choices(charName); break; default: System.Console.WriteLine("You entered an invalid choice. Please try again."); System.Console.ReadKey(); numSelect = Convert.ToInt32(Console.ReadLine()); System.Console.WriteLine(Program.newLine); MakeChar player = new MakeChar(numSelect, charName); break; } }
// Method used to invoke a new game and select a character public void Start_Game() { int numSelect; string charName; // Script for starting the game System.Console.WriteLine("\nFirst things first. Let's get acquainted!"); System.Console.ReadKey(); System.Console.WriteLine(newLine); System.Console.WriteLine("What's your favorite color?"); System.Console.WriteLine(newLine); // Intentionally does nothing Console.ReadLine(); System.Console.WriteLine(newLine); System.Console.WriteLine("Hmm... well that's a, uh, choice now, isn't it? Maybe we should try an easier one.\n"); System.Console.WriteLine(newLine); System.Console.ReadKey(); System.Console.WriteLine("So what's your name?"); System.Console.WriteLine(newLine); // User input for name charName = Console.ReadLine(); System.Console.WriteLine("Great job {0}, I knew you could do it!", charName); System.Console.WriteLine(newLine); System.Console.ReadKey(); System.Console.WriteLine("Now, please enter a number to choose which character you would like to play."); System.Console.WriteLine(newLine); System.Console.WriteLine("1. Human"); System.Console.WriteLine(newLine); System.Console.WriteLine("2. Wizard"); System.Console.WriteLine(newLine); System.Console.WriteLine("3. Samurai"); System.Console.WriteLine(newLine); System.Console.WriteLine("4. Ninja"); System.Console.WriteLine(newLine); // User input for character class numSelect = Convert.ToInt32(Console.ReadLine()); System.Console.WriteLine(newLine); MakeChar player = new MakeChar(numSelect, charName); }