Ejemplo n.º 1
0
        public void Initialize(EntityKey owner, PlayerWeaponComponentsAgent agent, PlayerEntityWeaponInteract interact, GrenadeCacheHelper helper)
        {
            Owner             = owner;
            grenadeHelper     = helper;
            weaponInteract    = interact;
            playerWeaponAgent = agent;
            int modeBagLength = ModeController.GetUsableWeapnBagLength(RelatedPlayerInfo);

            slotWeaponAgents = new WeaponBaseAgent[GlobalConst.WeaponBagMaxCount, GlobalConst.WeaponSlotMaxLength];
            var throwWeaponAgent = CreateGetWeaponAgent(0, EWeaponSlotType.ThrowingWeapon);

            //多个背包共享一份投掷武器代理
            if (modeBagLength > 1)
            {
                for (int i = 1; i < modeBagLength; i++)
                {
                    slotWeaponAgents[i, (int)EWeaponSlotType.ThrowingWeapon] = throwWeaponAgent;
                }
            }
        }
Ejemplo n.º 2
0
 public NoneWeaponAgent(Func <EntityKey> in_holdExtractor, Func <EntityKey> in_emptyExtractor, EWeaponSlotType slot, GrenadeCacheHelper grenadeHelper) : base(in_holdExtractor, in_emptyExtractor, slot, grenadeHelper)
 {
 }
Ejemplo n.º 3
0
 public WeaponBaseAgent(Func <EntityKey> in_holdExtractor, Func <EntityKey> in_emptyExtractor, EWeaponSlotType slot, GrenadeCacheHelper grenadeHelper)
 {
     weaponKeyExtractor = in_holdExtractor;
     emptyKeyExtractor  = in_emptyExtractor;
     handledSlot        = slot;
 }