Ejemplo n.º 1
0
 private void CheckBrokeThrow(PlayerWeaponController controller, IWeaponCmd cmd)
 {
     if (controller.RelatedThrowActionInfo.IsReady && cmd.FilteredInput.IsInputBlocked(EPlayerInput.IsThrowing))
     {
         //收回手雷
         controller.ForceUnarmCurrWeapon();
         if (controller.RelatedThrowActionInfo.IsPull)
         {
             //若已拉栓,销毁ThrowingEntity
             _throwingFactory.DestroyThrowing(controller.RelatedThrowActionInfo.ThrowingEntityKey);
         }
         //拉栓未投掷,打断投掷动作
         controller.RelatedStateInterface.ForceFinishGrenadeThrow();
         controller.RelatedThrowActionInfo.ClearState();
     }
 }
Ejemplo n.º 2
0
 private void CheckBrokeThrow(IPlayerWeaponState playerWeapon, IWeaponCmd cmd)
 {
     if (playerWeapon.ThrowingActionInfo.IsReady && cmd.FilteredInput.IsInputBlocked(EPlayerInput.IsThrowing))
     {
         //收回手雷
         playerWeapon.UnmountWeaponByAction();
         if (playerWeapon.ThrowingActionInfo.IsPull)
         {
             //若已拉栓,销毁ThrowingEntity
             _throwingFactory.DestroyThrowing(playerWeapon.ThrowingActionInfo.ThrowingEntityKey);
         }
         //拉栓未投掷,打断投掷动作
         playerWeapon.ForceStopThrowing();
         ClearState(playerWeapon);
     }
 }
Ejemplo n.º 3
0
 protected override bool CheckInterrupt(PlayerWeaponController controller, WeaponSideCmd cmd)
 {
     if (controller.RelatedThrowAction.IsReady &&
         cmd.FiltedInput(EPlayerInput.IsThrowingInterrupt))
     {
         //收回手雷
         controller.RelatedThrowAction.IsReady = false;
         if (controller.RelatedThrowAction.IsPull)
         {
             //若已拉栓,销毁ThrowingEntity
             _throwingFactory.DestroyThrowing(controller.RelatedThrowAction.ThrowingEntityKey);
         }
         controller.UnArmWeapon(false);
         //拉栓未投掷,打断投掷动作
         controller.RelatedCharState.ForceFinishGrenadeThrow();
         controller.RelatedThrowAction.ClearState();
         return(true);
     }
     return(false);
 }