Exemplo n.º 1
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();
    }
Exemplo n.º 2
0
    //-----------------------------------------------------------------------------------------------
    private void GetInfluenceSystemReferenceIfNeeded()
    {
        if (m_influenceSystem != null)
        {
            return;
        }

        m_influenceSystem = InfluenceSystem.GetInstance();
    }
Exemplo n.º 3
0
    //-----------------------------------------------------------------------------------------------
    public void GetInfluenceSystemReferencesIfNeeded()
    {
        if (m_influenceGameManager == null)
        {
            m_influenceGameManager = FindObjectOfType <InfluenceGameManager>();
        }

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