コード例 #1
0
 public GrenadeSlotHandler(
     PlayerEntity playerEntity,
     IPlayerWeaponActionLogic playerWeaponActionLogic,
     WeaponComponent weapon,
     IReservedBulletLogic reservedBulletController,
     IPlayerSoundManager playerSoundManager) : base(playerEntity, playerWeaponActionLogic, weapon, reservedBulletController, playerSoundManager)
 {
     _cacheAgent   = playerEntity.grenadeInventoryHolder.Inventory;
     _playerEntity = playerEntity;
 }
コード例 #2
0
 public WeaponSlotAuxiliary(
     PlayerEntity player,
     IWeaponSlotController weaponSlotController,
     IPlayerWeaponActionLogic playerWeaponActionLogic,
     IReservedBulletLogic reservedBulletController,
     IGrenadeBagCacheAgent grenadeInventory)
 {
     Util.CommonUtil.ProcessDerivedTypeInstances(typeof(WeaponSlotBaseHandler), true, OnDerivedTypeInstanceProcess);
     //var slots = weaponSlotController.AvaliableSlots;
     //for(int i = 0; i < slots.Length; i++)
     //{
     //    var slot = slots[i];
     //    var weaponComponent = player.GetWeaponComponentBySlot(slot);
     //    var soundManager = player.soundManager.Value;
     //    switch(slot)
     //    {
     //        case EWeaponSlotType.GrenadeWeapon:
     //            _controllerDic[slot] = new GrenadeSlotHandler(
     //                player,
     //                playerWeaponActionLogic,
     //                weaponComponent,
     //                reservedBulletController,
     //                soundManager);
     //            break;
     //        case EWeaponSlotType.MeleeWeapon:
     //            _controllerDic[slot] = new MeleeSlotHandler(
     //                player,
     //                playerWeaponActionLogic,
     //                weaponComponent,
     //                reservedBulletController,
     //                soundManager);
     //            break;
     //        case EWeaponSlotType.TacticWeapon:
     //            _controllerDic[slot] = new TacticSlotHandler(
     //                player,
     //                playerWeaponActionLogic,
     //                weaponComponent,
     //                reservedBulletController,
     //                soundManager);
     //            break;
     //        default:
     //            _controllerDic[slot] = new WeaponSlotBaseHandler(
     //                player,
     //                playerWeaponActionLogic,
     //                weaponComponent,
     //                reservedBulletController,
     //                soundManager);
     //            break;
     //    }
     //}
 }
コード例 #3
0
 public PlayerWeaponActionLogic(
     PlayerEntity player,
     WeaponBagLogic bagLogic,
     ISceneObjectEntityFactory sceneObjectEntityFactory,
     IReservedBulletLogic reservedBulletLogic,
     IGrenadeBagCacheAgent grenadeInventory,
     IWeaponSlotController weaponSlotController,
     IWeaponActionListener weaponActionListener)
 {
     _playerEntity         = player;
     _weaponBagLogic       = bagLogic;
     _weaponSlotController = weaponSlotController;
     _slotAuxiliary        = new WeaponSlotAuxiliary(player,
                                                     weaponSlotController,
                                                     this,
                                                     reservedBulletLogic,
                                                     grenadeInventory);
     _weaponActionListener = weaponActionListener;
 }