public EWeaponSlotType UnArmWeapon(bool includeAction, bool needInterrupt = false) { if (IsHeldSlotEmpty) { return(EWeaponSlotType.None); } AudioController.StopPullBoltAudio(); RelatedThrowAction.CleanThrowingState(); HeldWeaponAgent.InterruptPullBolt(); var holdSlot = HeldSlotType; if (needInterrupt) { DoAppearanceInterrupt(); } if (includeAction) { DoDrawUnarmWeaponWithAction(); } else { DoDrawUnarmWeaponWithoutAction(HeldConfigId); } return(holdSlot); }
public void ArmWeapon(EWeaponSlotType slot, bool includeAction) { slot = processHelper.GetRealSlotType(slot); if (!processHelper.FilterSameSpecies(slot) || !processHelper.FilterSlotValied(slot)) { return; } //把当前的一些枪械状态重置掉 HeldWeaponAgent.InterruptPullBolt(); var lastWeapon = HeldConfigId; var destWeapon = GetWeaponAgent(slot).ComponentScan; var appearanceStruct = processHelper.GetDrawAppearanceStruct(slot); DoSpecialAppearance(); DoAppearanceInterrupt(); if (includeAction) { if (IsHeldSlotEmpty) { DoDrawArmWeaponWithActionFromEmpty(destWeapon, lastWeapon, appearanceStruct); } else { DoDrawArmWeaponWithActionFromOtherWeapon(destWeapon, lastWeapon, appearanceStruct); } } else { //CharacterState控制动作相关 DoDrawArmWeaponWithoutAction(destWeapon, lastWeapon, appearanceStruct); } onWeaponSwitchEvt(this, HeldConfigId, EInOrOff.In); }