public WeaponBaseAgent(Func <EntityKey> in_holdExtractor, Func <EntityKey> in_emptyExtractor, EWeaponSlotType slot, GrenadeCacheHandler grenadeHandler) { weaponKeyExtractor = in_holdExtractor; emptyKeyExtractor = in_emptyExtractor; handledSlot = slot; }
public void Initialize(PlayerEntity entity, GrenadeCacheHandler handler) { SetEnity(entity); _grenadeHandler = handler; CommonUtil.ProcessDerivedTypes(typeof(WeaponBaseAgent), true, (Type t) => OnDerivedTypeInstanceProcess(t)); // int modeBagLength = ModeController.GetUsableWeapnBagLength(RelatedPlayerInfo); ////多个背包共享一份投掷武器代理 //if (modeBagLength > 1) //{ // for (int i = 1; i < modeBagLength; i++) // slotWeaponAgents[i, (int)EWeaponSlotType.ThrowingWeapon] = throwWeaponAgent; //} }
public NoneWeaponAgent(Func <EWeaponSlotType, EntityKey> in_holdExtractor, Func <EntityKey> in_emptyExtractor, EWeaponSlotType slot, GrenadeCacheHandler grenadeHandler) : base(in_holdExtractor, in_emptyExtractor, slot, grenadeHandler) { }