コード例 #1
0
ファイル: GASimulation.cs プロジェクト: yazici/ann_ecosystem
 void Awake()
 {
     if (AGENT_DATABASE == null)
     {
         AGENT_DATABASE = FindObjectOfType <AgentDatabase>();
     }
 }
コード例 #2
0
ファイル: AgentSight.cs プロジェクト: yazici/ann_ecosystem
        void Awake()
        {
            m_ID = transform.gameObject.GetInstanceID();

            if (AGENT_DB == null)
            {
                AGENT_DB = FindObjectOfType <AgentDatabase>();
            }
        }
コード例 #3
0
        void Awake()
        {
            if (smoothing)
            {
                // If smoother attached then use that.
                m_Smoother = GetComponent <Smoother> ();

                // Else add smoother componenet.
                if (!m_Smoother)
                {
                    m_Smoother = gameObject.AddComponent <Smoother> ();
                }
            }

            if (AGENT_DB == null)
            {
                AGENT_DB = FindObjectOfType <AgentDatabase> ();
            }
        }