Ejemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            // If Kujenga boss has been defeated the game object is deactivated
            if (!SharedInfo.KujengaBossDefeated)
            {
                this.gameObject.SetActive(SharedInfo.CurseStarted);
            }
            else
            {
                this.gameObject.SetActive(false);
            }

            _healthManager = GetComponent <EnemyHealthManager>();
            if (_healthManager == null)
            {
                throw new MissingComponentException("Kujenga Boss is missing the EnemyHealthManager component!");
            }

            _kujengaMovement = GetComponent <KujengaMovement>();
            if (_healthManager == null)
            {
                throw new MissingComponentException("Kujenga Boss is missing the KujengaMovement component!");
            }

            _attackController = GetComponent <KujengaAttackController>();
            if (_healthManager == null)
            {
                throw new MissingComponentException("Kujenga Boss is missing the KujengaAttackController component!");
            }

            _interactable = GetComponent <Interactable>();
            if (_healthManager == null)
            {
                throw new MissingComponentException("Kujenga Boss is missing the Interactable component!");
            }
        }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     _attackTarget    = GameObject.FindGameObjectWithTag("Player");
     _animator        = GetComponent <Animator>();
     _kujengaMovement = GetComponent <KujengaMovement>();
 }