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();
    }
Beispiel #2
0
 public static EventUIScriptableObject GetUiSettings()
 {
     if (uiSettings == null)
     {
         uiSettings = Resources.Load("UiSettings") as EventUIScriptableObject;
     }
     return(uiSettings);
 }
Beispiel #3
0
    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;
    }