2021-12-23 02:27:12 +00:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
|
2022-03-03 03:46:33 +00:00
|
|
|
|
namespace QSB.ClientServerStateSync.Messages;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// sets the state both locally and remotely
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal class ServerStateMessage : QSBMessage<ServerState>
|
2021-12-23 02:27:12 +00:00
|
|
|
|
{
|
2022-03-11 01:57:50 +00:00
|
|
|
|
public ServerStateMessage(ServerState state) : base(state) { }
|
2021-12-23 02:27:12 +00:00
|
|
|
|
|
2022-03-03 03:46:33 +00:00
|
|
|
|
public override void OnReceiveLocal() => OnReceiveRemote();
|
|
|
|
|
public override void OnReceiveRemote()
|
|
|
|
|
=> ServerStateManager.Instance.ChangeServerState(Data);
|
2022-02-25 06:04:54 +00:00
|
|
|
|
}
|