예제 #1
0
 private void Start()
 {
     _hp              = GetComponent <Enemy_HP>();
     _movement        = GetComponent <Enemy_Movement>();
     _searchForPlayer = GetComponent <Enemy_SearchForPlayer>();
     _wallCheck       = GetComponentInChildren <BasicEnemy_WallCheck>();
     _attack          = GetComponentInChildren <Enemy_Attack>();
     _attackTrigger   = GetComponentInChildren <Enemy_AttackTrigger>();
     _audioSource     = GetComponent <AudioSource>();
     _audioSource2    = _attack.GetComponent <AudioSource>();
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     _playerMovement  = FindObjectOfType <Player_Movement>();
     _transform       = GetComponent <Transform>();
     _enemyController = GetComponent <Enemy_Controller>();
     _animator        = GetComponent <Animator>();
     _instance        = this;
     _wallCheck       = GetComponentInChildren <BasicEnemy_WallCheck>();
     _rigidBody2D     = GetComponent <Rigidbody2D>();
     _enemyAttack     = GetComponentInChildren <Enemy_Attack>();
     _player          = _playerMovement.GetComponent <Transform>();
 }
예제 #3
0
        // Use this for initialization
        void Start()
        {
            _transform            = GetComponent <Transform>();
            _instance             = this;
            _attackHitBox         = GetComponentInChildren <BoxCollider2D>();
            _attackHitBox.enabled = false;
            _player          = FindObjectOfType <Player_HP>();
            _enemyController = GetComponentInParent <Enemy_Controller>();
            _animator        = GetComponentInParent <Animator>();
            _rigidBody       = GetComponentInParent <Rigidbody2D>();
            _movement        = GetComponentInParent <Enemy_Movement>();

            _coolDownTimer = _attackCoolDown;
            _attackTimer   = _attackTime;
            _delayTimer    = _attackDelay;
        }
예제 #4
0
 private void Start()
 {
     _enemyMovement = GetComponentInParent <Enemy_Movement>();
     _transform     = GetComponent <Transform>();
     _controller    = GetComponentInParent <Enemy_Controller>();
 }