Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     fOV                   = GetComponent <FieldOfView>();
     anim                  = GetComponent <Animator>();
     scan                  = GetComponent <Scan>();
     distract              = GetComponent <Distractable>();
     hearing               = GetComponent <Hearing>();
     scanCompleteString    = "ScanComplete";
     playerLostString      = "PlayerLost";
     playerSpottedString   = "PlayerSpotted";
     enemyDistractedString = "Distracted";
 }
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)
 {
     distract    = animator.gameObject.GetComponent <Distractable>();
     moveToPoint = animator.gameObject.GetComponent <MoveToPoint>();
 }