Ejemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            _lineCastObject = GameObject.Find("LineCastEndingPoint");

            _animator            = GetComponent <Animator>();
            _transform           = GetComponent <Transform>();
            _enemyController     = GetComponent <Enemy_Controller>();
            _turnToPassiveTimer  = _timeBeforeTurningPassive;
            _lineCastEndingPoint = _lineCastObject.GetComponent <Transform>();
        }
Ejemplo n.º 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>();
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 4
0
        // Use this for initialization
        void Start()
        {
            if (!_hasCustomScripts)
            {
                _enemyController = GetComponent <Enemy_Controller>();
            }

            _animator    = GetComponent <Animator>();
            _transform   = GetComponent <Transform>();
            _audioSource = GetComponent <AudioSource>();

            _originalHP = hitPoints;

            if (thisIsABoss)
            {
                _BossHP = FindObjectOfType <BossHPBarController>();
            }
        }
Ejemplo n.º 5
0
 private void Start()
 {
     _enemyMovement = GetComponentInParent <Enemy_Movement>();
     _transform     = GetComponent <Transform>();
     _controller    = GetComponentInParent <Enemy_Controller>();
 }