void Awake() { map = GameObject.Find("Map").GetComponent <MapSettings>(); mapName = gameObject.transform; mapNameBox = mapName.Find("BoxImage").GetComponent <Image>(); mapNameText = mapName.Find("BoxText").GetComponent <TMP_Text>(); mapNameTextShadow = mapName.Find("BoxTextShadow").GetComponent <TMP_Text>(); text = mapName.Find("BoxText").GetComponent <TMP_TextJuicer>(); textShadow = mapName.Find("BoxTextShadow").GetComponent <TMP_TextJuicer>(); }
/*public static DialogueSystem GetDialogueSystem() * { * return _dialogueSystem ?? (_dialogueSystem = new DialogueSystem()); //If null, right, if not, left, simple! * }*/ private static void Instantiate() { _dialoguePanel = GameObject.Find("DialoguePanel").gameObject; _textJuicer = Object.FindObjectOfType <TMP_TextJuicer>().gameObject.GetComponent <TMP_TextJuicer>(); UIHelperClass.ShowPanel(_dialoguePanel, false); for (var i = 0; i < 4; i++) { _buttonEventHandlers[i] = GameObject.Find("Option" + i).GetComponent <ButtonEventHandler>(); } _dialogueTextMesh = GameObject.Find("DialogueText").GetComponent <TextMeshProUGUI>(); _defaultContinueEventInfo = ScriptableObject.CreateInstance <DialogueEventInfo>(); _defaultContinueEventInfo.eventType = DIALOGUE_EVENT_TYPE.ContinueDialogue; _defaultContinueEventInfo.Validate(); }