Example #1
0
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        mAgentAi = animator.gameObject.GetComponent <AgentAi>();


        mAgentAi.mAgent.m_Target = FlockManager.getTarget(mAgentAi.mAgent.m_Agent).m_Target;
    }
Example #2
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     mAgentAi.mAgent.m_Target = FlockManager.getTarget(mAgentAi.mAgent.m_Agent).m_Target;
     mAgentAi.mAgent.pursuit(mAgentAi.mAgent.m_Agent.transform.position);
 }
Example #3
0
 public void OnTriggerEnter(Collider other)
 {
     FlockManager.getListBot().Remove(other.gameObject.GetComponent <Bot>());
     Destroy(other.gameObject);
     m_Target = FlockManager.getTarget(m_Agent).m_Target;
 }
Example #4
0
 void Update()
 {
     m_Target = FlockManager.getTarget(m_Agent).m_Target;
 }
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     mAgentAi.mAgent.m_Target = FlockManager.getTarget(mAgentAi.mAgent.m_Agent).m_Target;
     mAgentAi.mAgent.wander();
 }