Ejemplo n.º 1
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     finishEating = false;
     astar        = animator.GetComponent <AStarNavigation>();
     wormFSM      = animator.GetComponent <WormFSM>();
     astar.ChangeGoalPosition(wormFSM.foodAgent.transform.position);
     astar.Speed = wormFSM.chaseSpeed;//Increase speed
 }
Ejemplo n.º 2
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     wormFSM = animator.GetComponent <WormFSM>();
     wormFSM.GrowNewBody();
 }
Ejemplo n.º 3
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     astar   = animator.GetComponent <AStarNavigation>();
     wormFSM = animator.GetComponent <WormFSM>();
 }