public void Awake() { SetVisible(false); uiTypes = Gamemode.GetUiSettings(); EmitterSelect = gameObject.AddComponent <StudioEventEmitter>(); EmitterSelect.Event = FModStrings.ChoiceHover; EmitterSubmit = gameObject.AddComponent <StudioEventEmitter>(); EmitterSubmit.Event = FModStrings.ChoiceClick; EmitterAppear = gameObject.AddComponent <StudioEventEmitter>(); EmitterAppear.Event = FModStrings.ListAppear; button.onClick.AddListener(delegate { if (currentChoice == null) { Debug.LogError("Button shouldn't have beenn interactable"); return; } currentChoice.Select(); }); uiTypes = Gamemode.GetUiSettings(); }
public void Start() { uiTypes = Gamemode.GetUiSettings(); StoryManager.Instance.OnEventStart += OnEventStart; StoryManager.Instance.OnEventClose += OnEventClose; StoryManager.Instance.OnChoiceAdded += OnChoiceAdded; StoryManager.Instance.OnChoiceRemoved += OnChoiceRemoved; SetVisible(false); originalScale = eventText.transform.parent.GetComponent <RectTransform>().sizeDelta; }