// Start is called before the first frame update /** * Don't try changing the Start() below to an Awake(). * There's a bunch of shit that needs to happen in the classes * before the driver can start. */ void Start() { playerCommand1 = playerCommandButton1.GetComponent <IObserver>(); playerCommand2 = playerCommandButton2.GetComponent <IObserver>(); playerCommand3 = playerCommandButton3.GetComponent <IObserver>(); playerCommand4 = playerCommandButton4.GetComponent <IObserver>(); chatBotResponse = chatBotResponseCanvas.GetComponent <IObserver>(); randomCharacter = Character.createRandomCharacter(); randomCharacter.registerObserver(playerCommand1); randomCharacter.registerObserver(playerCommand2); randomCharacter.registerObserver(playerCommand3); randomCharacter.registerObserver(playerCommand4); randomCharacter.registerObserver(chatBotResponse); startingChatMenu = ChatMenu.GetRootChatMenu(randomCharacter, randomCharacter.characterName.GetNPCResponseText()); randomCharacter.notifyObservers(startingChatMenu); //PrintCharacter(randomCharacter); }
public override ChatMenu GetChatMenu(Character c) { ChatMenu chatMenu = ChatMenu.GetRootChatMenu(c, GetNPCResponseText()); return(chatMenu); }