Esempio n. 1
0
 void Awake()
 {
     m_questStateDispatcher = FindObjectOfType <QuestStateDispatcher>();
     m_questStateIndicator  = GetComponent <QuestStateIndicator>();
     if (m_questStateDispatcher == null)
     {
         if (DialogueDebug.LogWarnings)
         {
             Debug.LogWarning("Dialogue System: " + name + ": Can't find a QuestStateDispatcher on the Dialogue Manager.", this);
         }
         enabled = false;
     }
 }
Esempio n. 2
0
 void Awake()
 {
     m_questStateDispatcher = FindObjectOfType <QuestStateDispatcher>();
     m_questStateIndicator  = GetComponent <QuestStateIndicator>();
     if (m_questStateDispatcher == null)
     {
         var dialogueManager = FindObjectOfType <DialogueSystemController>();
         if (dialogueManager != null)
         {
             m_questStateDispatcher = dialogueManager.gameObject.AddComponent <QuestStateDispatcher>();
         }
         else
         {
             if (DialogueDebug.LogWarnings)
             {
                 Debug.LogWarning("Dialogue System: " + name + ": Can't find the Dialogue Manager to add a QuestStateDispatcher.", this);
             }
             enabled = false;
         }
     }
 }