mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-06 09:39:52 +00:00
9e5e7bb6a1
- 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
22 lines
530 B
C#
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);
|
|
}
|
|
}
|