public void SetUpTurn(EventObject aEvent) { IncreaseCurrentYear(); if (m_CurrentYear >= FINAL_YEAR) { PlayerWinned("Congradulations, you have made it to the year " + FINAL_YEAR + "!"); return; } m_CurrentEvent = aEvent; SetAllButtonsEnabled(false); m_bIsTextBeingShown = true; m_bIsChoiceBeingShown = true; m_bIsConsequenceBeingShown = false; aEvent.m_bHasBeenSeen = true; if (aEvent.m_EventImage != null) { m_EventImage.GetComponent <Image>().sprite = aEvent.m_EventImage; m_EventImage.gameObject.SetActive(true); } m_DialogueManager.StartDialogue(aEvent.m_EventText); //Create some sort of logic to put in random events into spots that don't have any }
private IEnumerator DisplayDialogFor(float t) { DIalogueManager dman = FindObjectOfType <DIalogueManager>(); dman.StartDialogue(dialogue); foreach (string str in dialogue.sentences) { yield return(new WaitForSeconds(t)); dman.StartCoroutine(dman.TypeSentence(str)); Debug.Log(str); } yield return(new WaitForSeconds(t)); dman.EndDialogue(); }