quantum-space-buddies/QSB/ClientServerStateSync/Messages/ServerStateMessage.cs

16 lines
409 B
C#
Raw Normal View History

2021-12-23 02:27:12 +00:00
using QSB.Messaging;
2021-12-23 21:57:33 +00:00
namespace QSB.ClientServerStateSync.Messages
2021-12-23 02:27:12 +00:00
{
internal class ServerStateMessage : QSBEnumMessage<ServerState>
{
public ServerStateMessage(ServerState state) => Value = state;
public ServerStateMessage() { }
public override void OnReceiveLocal() => OnReceiveRemote();
public override void OnReceiveRemote()
=> ServerStateManager.Instance.ChangeServerState(Value);
}
}