quantum-space-buddies/QSB/CampfireSync/WorldObjects/QSBCampfire.cs
2021-03-31 10:30:51 +01:00

26 lines
601 B
C#

using QSB.WorldSync;
using System.Reflection;
namespace QSB.CampfireSync.WorldObjects
{
public class QSBCampfire : WorldObject<Campfire>
{
public override void Init(Campfire campfire, int id)
{
ObjectId = id;
AttachedObject = campfire;
}
public void StartRoasting()
=> AttachedObject
.GetType()
.GetMethod("StartRoasting", BindingFlags.NonPublic | BindingFlags.Instance)
.Invoke(AttachedObject, null);
public Campfire.State GetState()
=> AttachedObject.GetState();
public void SetState(Campfire.State newState)
=> AttachedObject.SetState(newState);
}
}