quantum-space-buddies/QSB/ClientServerStateSync/Messages/ServerStateMessage.cs
2023-07-28 19:30:57 +01:00

15 lines
431 B
C#

using QSB.Messaging;
namespace QSB.ClientServerStateSync.Messages;
/// <summary>
/// sets the state both locally and remotely
/// </summary>
public class ServerStateMessage : QSBMessage<ServerState>
{
public ServerStateMessage(ServerState state) : base(state) { }
public override void OnReceiveLocal() => OnReceiveRemote();
public override void OnReceiveRemote()
=> ServerStateManager.Instance.ChangeServerState(Data);
}