Exemplo n.º 1
0
        public NodeProcessor(SceneManager sceneManager)
        {
            m_sceneManager = sceneManager;

            m_audioManager      = m_sceneManager.GetAudioManager();
            m_backgroundManager = m_sceneManager.GetBackgroundManager();
            m_characterManager  = m_sceneManager.GetCharacterManager();
            m_dialogueManager   = m_sceneManager.GetDialogueManager();
            m_variableManager   = m_sceneManager.GetVariableManager();
        }
Exemplo n.º 2
0
        private void Awake()
        {
            m_instance = this;

            Blackboard[] blackboards = Resources.FindObjectsOfTypeAll <Blackboard>();

            m_blackboards = new List <Blackboard>();
            for (int i = 0; i < blackboards.Length; i++)
            {
                Blackboard blackboard = ScriptableObject.CreateInstance <Blackboard>();
                blackboard.Copy(blackboards[i]);
                m_blackboards.Add(blackboard);
            }

            if (m_audioComponent != null)
            {
                m_audioManager = m_audioComponent.GetAudioManager();
            }
            if (m_backgroundComponent != null)
            {
                m_backgroundManager = m_backgroundComponent.GetBackgroundManager();
            }
            if (m_branchComponent != null)
            {
                m_branchManager = m_branchComponent.GetBranchManager();
            }
            if (m_characterComponent != null)
            {
                m_characterManager = m_characterComponent.GetCharacterManager();
            }
            if (m_dialogueComponent != null)
            {
                m_dialogueManager = m_dialogueComponent.GetDialogueManager();
            }
            if (m_saveComponent != null)
            {
                m_saveManager = new SaveManager(this, m_saveComponent);
            }

            m_utilityManager  = new UtilityManager();
            m_variableManager = new VariableManager();

            m_nodeEvaluator = new NodeEvaluator(this);
        }