JohnCorby 9e5e7bb6a1 initial state:
- always send from the host
- QSBNetworkBehaviour will store last known data in an array and send that, since real data will be wrong if no authority
2022-02-16 19:22:21 -08:00

22 lines
530 B
C#

using QSB.CampfireSync.Messages;
using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.CampfireSync.WorldObjects
{
public class QSBCampfire : WorldObject<Campfire>
{
public override void SendInitialState(uint to) =>
this.SendMessage(new CampfireStateMessage(GetState()) { To = to });
public void StartRoasting()
=> AttachedObject.StartRoasting();
public Campfire.State GetState()
=> AttachedObject.GetState();
public void SetState(Campfire.State newState)
=> AttachedObject.SetState(newState);
}
}