Пример #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>();
 }
Пример #2
0
        // Use this for initialization
        void Start()
        {
            _lineCastObject = GameObject.Find("LineCastEndingPoint");

            _animator            = GetComponent <Animator>();
            _transform           = GetComponent <Transform>();
            _enemyController     = GetComponent <Fenrir_Controller>();
            _turnToPassiveTimer  = _timeBeforeTurningPassive;
            _lineCastEndingPoint = _lineCastObject.GetComponent <Transform>();
            _enemyAttack         = GetComponentInChildren <Fenrir_Attack>();
        }
Пример #3
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>();
 }
Пример #4
0
        // Use this for initialization
        void Start()
        {
            _enemyController = GetComponent <Fenrir_Controller>();
            _attack          = GetComponentInChildren <Fenrir_Attack>();
            _animator        = GetComponent <Animator>();
            _transform       = GetComponent <Transform>();
            _audioSource     = GetComponent <AudioSource>();

            _originalHP = hitPoints;
            if (thisIsABoss)
            {
                _BossHP = FindObjectOfType <BossHPBarController>();
            }
        }
Пример #5
0
 // Use this for initialization
 void Start()
 {
     _enemyAttack = GetComponentInParent <Fenrir_Attack>();
     _player      = FindObjectOfType <Player_HP>();
 }