Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     audioSource  = GetComponent <AudioSource>();
     anima        = GetComponent <Animator>();
     player       = GameObject.FindGameObjectWithTag("Player");
     aggroScript  = GetComponentInChildren <AggroBox>();
     obstacle     = GetComponentInChildren <ObstacleDetection>();
     playerScript = player.GetComponent <PlayerStateController>();
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     audioSource  = GetComponent <AudioSource>();
     aggroScript  = aggroBox.GetComponent <AggroBox>();
     player       = GameObject.FindGameObjectWithTag("Player");
     playerScript = player.GetComponent <PlayerStateController>();
     height       = transform.position.y;
     anima        = GetComponent <Animator>();
 }