예제 #1
0
        // Use this for initialization
        void Start()
        {
            _characterController           = GetComponent <CharacterController>();
            _inventory                     = GetComponent <Character.Inventory.Inventory>();
            _characterHealth               = GetComponent <CharacterHealth>();
            _characterHealth.HealthChange += Notify;
            _inventory.InventoryChange    += Notify;
            trackEnnemy                    = false;
            _playerDistance                = 150;
            _playerToChase                 = 0;
            _enemyDetectionRange           = 10;
            _enemyAttackRange              = 4;
            waitFrameToAttack              = 0;
            waitFrameToWalk                = 0;
            randomX = 0; randomY = 0;

            //to generalize (detect if normal mob or boss)
            if (GetComponent <BossNecromancer>() != null)
            {
                enemyIsBoss      = true;
                _bossNecromancer = GetComponent <BossNecromancer>();
            }
            else
            {
                enemyIsBoss = false;
            }

            if (enemyIsMinion)
            {
                gameObject.SetActive(false);
            }
        }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     _characterHealth  = GetComponent <CharacterHealth>();
     _inventory        = GetComponent <Character.Inventory.Inventory>();
     phaseThreeStarted = false;
     firstSummon       = false;
     secondSummon      = false;
 }
예제 #3
0
 private void Start()
 {
     Joystick                       = new Joystick(PlayerNumber);
     _characterController           = GetComponent <CharacterController>();
     _characterInteraction          = GetComponent <CharacterInteraction>();
     _inventory                     = GetComponent <Character.Inventory.Inventory>();
     _characterHealth               = GetComponent <CharacterHealth>();
     _characterLight                = GetComponent <CharacterLight>();
     _characterHealth.HealthChange += Notify;
     _inventory.InventoryChange    += Notify;
 }