Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     _playerMovement  = FindObjectOfType <Player_Movement>();
     _transform       = GetComponent <Transform>();
     _enemyController = GetComponent <Fenrir_Controller>();
     _animator        = GetComponent <Animator>();
     _wallCheck       = GetComponentInChildren <Fenrir_WallCheck>();
     _rigidBody2D     = GetComponent <Rigidbody2D>();
     _enemyAttack     = GetComponentInChildren <Fenrir_Attack>();
     _player          = _playerMovement.GetComponent <Transform>();
 }
Exemplo n.º 2
0
 private void Start()
 {
     _instance        = this;
     _hp              = GetComponent <Fenrir_HP>();
     _movement        = GetComponent <Fenrir_Movement>();
     _searchForPlayer = GetComponent <Fenrir_Search>();
     _wallCheck       = GetComponentInChildren <Fenrir_WallCheck>();
     _attack          = GetComponentInChildren <Fenrir_Attack>();
     _attackTrigger   = GetComponentInChildren <Fenrir_AttackTrigger>();
     _audioSource     = GetComponent <AudioSource>();
     _audioSource2    = _attack.GetComponent <AudioSource>();
 }