Exemple #1
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>();
 }
        // Use this for initialization
        void Start()
        {
            _transform            = GetComponent <Transform>();
            _attackHitBox         = GetComponentInChildren <BoxCollider2D>();
            _attackHitBox.enabled = false;
            _player          = FindObjectOfType <Player_HP>();
            _enemyController = GetComponentInParent <Fenrir_Controller>();
            _animator        = GetComponentInParent <Animator>();
            _rigidBody       = GetComponentInParent <Rigidbody2D>();
            _movement        = GetComponentInParent <Fenrir_Movement>();
            _hp = GetComponentInParent <Fenrir_HP>();

            _coolDownTimer = _attackCoolDown;
            _attackTimer   = _attackTime;
            _delayTimer    = _attackDelay;
            _specialPointL = GameObject.Find("SpecialPointL");
            _specialPointR = GameObject.Find("SpecialPointR");
            _specialEffect = GetComponentInChildren <ParticleSystem>();
            //_bodyTransform = GetComponentInParent<Transform>();
        }
 private void Start()
 {
     _enemyMovement = GetComponentInParent <Fenrir_Movement>();
     _transform     = GetComponent <Transform>();
     _controller    = GetComponentInParent <Fenrir_Controller>();
 }