quantum-space-buddies/QSB/ClientServerStateSync/Messages/ServerStateMessage.cs
2022-03-10 17:57:50 -08:00

15 lines
433 B
C#

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