Пример #1
0
    //Countdown for the available time. Picking a choice is done by the graph when it ends. All we need to do is to stop
    //showing the UI
    IEnumerator GUICountDown()
    {
        while (timer > 0)
        {
            timer -= Time.deltaTime;
            yield return(null);
        }

        currentOptions = null;
    }
Пример #2
0
 //A function with the same name as the subscribed Event is called when the event is dispatched
 void OnDialogueOptions(DialogueOptionsInfo optionsInfo)
 {
     enabled        = true;
     timer          = optionsInfo.availableTime;
     currentOptions = optionsInfo;
     StopCoroutine("GUICountDown");
     if (timer > 0)
     {
         StartCoroutine("GUICountDown");
     }
 }
Пример #3
0
 void OnDialogueFinished()
 {
     enabled        = false;
     currentOptions = null;
     StopCoroutine("GUICountDown");
 }