public GrenadeSlotHandler( PlayerEntity playerEntity, IPlayerWeaponActionLogic playerWeaponActionLogic, WeaponComponent weapon, IReservedBulletLogic reservedBulletController, IPlayerSoundManager playerSoundManager) : base(playerEntity, playerWeaponActionLogic, weapon, reservedBulletController, playerSoundManager) { _cacheAgent = playerEntity.grenadeInventoryHolder.Inventory; _playerEntity = playerEntity; }
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; // } //} }
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; }