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)
 {
     astar  = animator.GetComponent <AStarNavigation>();
     hitFSM = animator.GetComponent <HitmanFSM>();
     //Set destination to Contract Target
     astar.ChangeGoalPosition(hitFSM.GetContractObject().transform.position);
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     hitFSM             = this.GetComponentInParent <HitmanFSM>();
     rb                 = this.GetComponent <Rigidbody>();
     rb.useGravity      = false;
     rb.isKinematic     = true;
     collider           = this.GetComponent <BoxCollider>();
     collider.isTrigger = true;
 }
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)
 {
     astar         = animator.GetComponent <AStarNavigation>();
     hitFSM        = animator.GetComponent <HitmanFSM>();
     visibleTarget = hitFSM.GetVisibleTargetObject();
     if (visibleTarget != null)
     {
         //transition to assassinate
         animator.SetBool("FoundTarget", true);
     }
 }
Exemplo n.º 4
0
 private void OnEnable()
 {
     Hitman = (HitmanFSM)target;
 }
Exemplo n.º 5
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>();
     hitFSM = animator.GetComponent <HitmanFSM>();
     hitFSM.NextContract();
 }