// Use this for initialization void Start() { mainSceneController = this; TutorialTextComponent = TutorialText.GetComponent <Text>(); TutorialAngryTextComponent = TutorialAngryText.GetComponent <Text>(); DialogueTextComponent = DialogueText.GetComponent <Text>(); TraversalDialogueTextComponent = TraversalDialogueText.GetComponent <Text>(); TutorialButtonTextComponent = TutorialButtonText.GetComponent <Text>(); TutorialAngryButtonTextComponent = TutorialAngryButtonText.GetComponent <Text>(); DialogueButton1TextComponent = DialogueButton1Text.GetComponent <Text>(); DialogueButton2TextComponent = DialogueButton2Text.GetComponent <Text>(); TraversalDialogueButton1TextComponent = TraversalDialogueButton1Text.GetComponent <Text>(); TraversalDialogueButton2TextComponent = TraversalDialogueButton2Text.GetComponent <Text>(); ClipboardRigidBody = GOClipboard.GetComponent <Rigidbody>(); ClipboardScript = GOClipboard.GetComponent <Clipboard>(); MinigameDoorsRigidBody = MinigameDoors.GetComponent <Rigidbody>(); int rand = Random.Range(1, 4); ClipboardDoorNumber = Random.Range(1, 4); Debug.Log(ClipboardDoorNumber); if (rand == 1) { Kira.SetActive(false); Jeff.SetActive(false); ChosenCharacter = Liam; } if (rand == 2) { Liam.SetActive(false); Jeff.SetActive(false); ChosenCharacter = Kira; } if (rand == 3) { Liam.SetActive(false); Kira.SetActive(false); ChosenCharacter = Jeff; } // TESTING TESTING TESTING // gamePhase = GamePhase.Tutorial1; // gamePhase = GamePhase.WaitingForPlayer; // gamePhase = GamePhase.ClipboardAppears; // gamePhase = GamePhase.WaitingForPlayerAtFireArea; gamePhase = GamePhase.TransitionToNextHallway; // gamePhase = GamePhase.WaitForPlayerToEnterElevator; // gamePhase = GamePhase.EntranceToEndRoom; GoToNextPhase(); // Kira.SetActive(false); Jeff.SetActive(false); ChosenCharacter = Liam; }
static void Main(string[] args) { Console.WriteLine("Hello World!"); //Human person = new Human("Allisa"); //Human person2 = new Human(); // Human is the base class for these 3 classes // Tre and Jimmy are derived classes // John is a derived class from Jimmy // Thus, Jimmy is both a base class and a derived class Jimmy jimmy = new Jimmy(); Tre tre = new Tre(); John john = new John(); // can't do this, because Robot is abstract // Robot neth = new Robot(); Jeff jeff = new Jeff("Jeff", 34); string answer = jeff.TakeOverTheWorld(); Console.WriteLine(answer); // these four can be in the same array because they // are all derived from the Creature class Creatures[] myHumans = { jimmy, john, tre, jeff }; for (int i = 0; i < myHumans.Length; i++) { if (myHumans[i] is Human) { // this outputs only 3 humans // because jeff is a robot Console.WriteLine($"{myHumans[i].Name} is human."); } } }
public JeffFeatureContext(Dill dill) : base(dill, "jeff.feature") { _jeff = new Jeff(); }