public void ExecuteUserCmd(IUserCmdOwner owner, IUserCmd cmd) { var player = (PlayerEntity)owner.OwnerEntity; if (player.gamePlay.IsLifeState(EPlayerLifeState.Dead) || !player.hasGenericActionInterface || player.IsOnVehicle()) { // gamePlay有对应的处理,这里不需要 return; } _genericAction = player.genericActionInterface.GenericAction; _genericAction.Update(player); if (cmd.IsJump) { TriggerActionInput(player); } }
public void ExecuteUserCmd(IUserCmdOwner owner, IUserCmd cmd) { var player = (PlayerEntity)owner.OwnerEntity; CheckPlayerLifeState(player); if (player.gamePlay.IsLifeState(EPlayerLifeState.Dead) || !player.hasGenericActionInterface || player.IsOnVehicle() || IsUnique(player)) { return; } _genericAction = player.genericActionInterface.GenericAction; _genericAction.Update(player); if (cmd.IsJump && CanClimb(player)) { TriggerActionInput(player); } }