示例#1
0
        private void OnDisable()
        {
            if (selfManaged)
            {
                agent = null;
            }

            if (m_agent == null)
            {
                return;
            }

            m_agent.navigationEnabled = false;
            m_agent.collisionEnabled  = false;
        }
示例#2
0
        private void OnEnable()
        {
            if (selfManaged)
            {
                agent = ORCABeacon.Get.defaultBundle.NewAgent(transform.position);
            }

            if (m_agent == null)
            {
                return;
            }

            m_agent.pos = transform.position;
            m_agent.navigationEnabled = navigationEnabled;
            m_agent.collisionEnabled  = collisionEnabled;
        }
示例#3
0
 private void OnDestroy()
 {
     agent = null;
 }