//-----------------------------------------------------------------------------------------------
    public void Awake()
    {
        GetInfluenceSystemReferencesIfNeeded();

        m_influenceGameManager.Awake();
        m_influenceGameManager.ReloadInfluenceMapData();
        m_influenceGameManager.RegisterAllActiveInfluenceObjectsInScene();
        m_influenceGameManager.UpdateInfluenceSystem();
    }
Beispiel #2
0
    //-----------------------------------------------------------------------------------------------
    private void GetAllReferencesAsNeeded()
    {
        if (m_strategyPlanner == null)
        {
            m_strategyPlanner = FindObjectOfType <StrategyPlanner>();
            m_strategyPlanner.Awake();
            m_strategyPlanner.Start();
        }

        if (m_aiManager == null)
        {
            m_aiManager = FindObjectOfType <AIManager>();
            m_aiManager.Awake();
        }

        m_buttons = FindObjectsOfType <Button>();

        if (m_influenceGameManager == null)
        {
            m_influenceGameManager = FindObjectOfType <InfluenceGameManager>();
        }

        if (m_influenceSystemRef == null)
        {
            m_influenceSystemRef = InfluenceSystem.GetInstance();
        }

        m_influenceGameManager.ReloadInfluenceMapData();
        m_influenceGameManager.RegisterAllActiveInfluenceObjectsInScene();
        m_influenceGameManager.UpdateInfluenceSystem();
    }