void Start() { _fsm = new FSM <DialogueChoice>(this); _fsm.TransitionTo <Standby>(); myEvent = transform.parent.GetComponent <IDialogueEvent>(); if (whoseChoice == 0) { outputChoice1 = GameObject.Find("Canvas").transform.Find("C1 Choice 1").GetComponent <Text>(); outputChoice2 = GameObject.Find("Canvas").transform.Find("C1 Choice 2").GetComponent <Text>(); lBIcon = GameObject.Find("Canvas").transform.Find("LBIcon-Left").gameObject; rBIcon = GameObject.Find("Canvas").transform.Find("RBIcon-Left").gameObject; //label = GameObject.Find("Canvas").transform.Find("C1 Label").GetComponent<Text>(); } else { outputChoice1 = GameObject.Find("Canvas").transform.Find("C2 Choice 1").GetComponent <Text>(); outputChoice2 = GameObject.Find("Canvas").transform.Find("C2 Choice 2").GetComponent <Text>(); lBIcon = GameObject.Find("Canvas").transform.Find("LBIcon-Right").gameObject; rBIcon = GameObject.Find("Canvas").transform.Find("RBIcon-Right").gameObject; //label = GameObject.Find("Canvas").transform.Find("C2 Label").GetComponent<Text>(); } next = GetAudio(); myDM = transform.root.gameObject.GetComponent <DialogueManager>(); }
//------------------------------------------------ // Basic //------------------------------------------------ private void Start() { _fsm = new FSM <PlayDialogue>(this); _fsm.TransitionTo <Standby>(); myEvent = transform.parent.GetComponent <IDialogueEvent>(); outputText = GameObject.Find("Canvas").transform.Find("Subtitle").GetComponent <Text>(); GetMyColor(); lines = GetAudio(soundType.line); //next = GetAudio(soundType.sfx); if (GetComponent <IObjective>() != null) { myO = GetComponent <IObjective>(); } }
public DialogueEventClass(GameObject me, IDialogueEvent myEvent, int i) { Script = myEvent; DEventName = me.transform.GetComponent <DialogueManager>().myEventsNames[i]; Trigger = false; }
protected static EventElement Event(IDialogueEvent dialogueEvent) { return new EventElement(dialogueEvent); }
//public void AddEvent(Action action) { // AddEvent(ActionDialogueEvent.Get(action)); //} //public void AddEvent(int confidence) { // AddEvent(ActionDialogueEvent.Get(PlayerDataConnector.AddConfidence, confidence)); //} public void AddEvent(IDialogueEvent dEvent) { if (thisElement != null) { dialogue.AddEvent(thisElement.ID, dEvent); } }
public EventElement(IDialogueEvent Event) : base() { this.Event = Event; }