Ejemplo n.º 1
0
 private void Start()
 {
     playerCombat   = GetComponent <CharacterCombat>();
     controller     = new PlayerController(this, playerCombat);
     playerCamera   = new PlayerCamera(this, mainCamera);
     navMeshAgent   = GetComponent <NavMeshAgent>();
     playerAnimator = GetComponent <PlayerAnimator>();
 }
Ejemplo n.º 2
0
        public void Awake()
        {
            _camera = new PlayerCamera(this, Camera);
            _controller = new PlayerController(this);
            _playerGUI = new PlayerGUI(this, _controller);

            _mounts = GetComponentsInChildren<BasicWeaponMount>();
            _weapons = new PlayerWeapons(this, Camera, _controller, _mounts);

            // Equip default weapon to all mounts
            Equip (BasicWeapon);
        }