quantum-space-buddies/QSB/Audio/Messages/PlayerMovementAudioJumpMessage.cs

17 lines
472 B
C#
Raw Permalink Normal View History

2022-08-27 18:07:50 -04:00
using QSB.Messaging;
using QSB.Player;
using QSB.WorldSync;
namespace QSB.Audio.Messages;
public class PlayerMovementAudioJumpMessage : QSBMessage<(float pitch, uint userID)>
{
public PlayerMovementAudioJumpMessage(float pitch, uint userID) : base((pitch, userID)) { }
public override bool ShouldReceive => QSBWorldSync.AllObjectsReady;
public override void OnReceiveRemote() =>
QSBPlayerManager.GetPlayer(Data.userID)?.AudioController?.OnJump(Data.pitch);
}