Exemple #1
0
 void Awake()
 {
     if (AGENT_DATABASE == null)
     {
         AGENT_DATABASE = FindObjectOfType <AgentDatabase>();
     }
 }
Exemple #2
0
        void Awake()
        {
            m_ID = transform.gameObject.GetInstanceID();

            if (AGENT_DB == null)
            {
                AGENT_DB = FindObjectOfType <AgentDatabase>();
            }
        }
        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> ();
            }
        }