Exemplo 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)
 {
     patrollableComponent            = animator.gameObject.GetComponent <Patrollable>();
     patrollableComponent.fleeCount += 1;
     //patrollableComponent.resetToDestinationVillage();
     entity = animator.gameObject.GetComponent <Entity>();
 }
Exemplo 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)
 {
     animator.gameObject.transform.GetChild(2).gameObject.GetComponent <ExclamationMarkScript>().SetActiveIfInsideFOV();
     animator.gameObject.transform.GetChild(2).gameObject.GetComponent <Animator>().SetTrigger("animateBounce");
     patrollableComponent = animator.gameObject.GetComponent <Patrollable>();
     entity = animator.gameObject.GetComponent <Entity>();
 }
Exemplo 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)
 {
     patrollableComponent = animator.gameObject.GetComponent <Patrollable>();
     entity = animator.gameObject.GetComponent <Entity>();
 }