26 lines
601 B
C#
Raw Normal View History

2021-03-29 14:36:16 +01:00
using QSB.WorldSync;
2021-03-29 23:36:51 +01:00
using System.Reflection;
2021-03-29 14:36:16 +01:00
namespace QSB.CampfireSync.WorldObjects
{
2021-03-31 10:30:51 +01:00
public class QSBCampfire : WorldObject<Campfire>
2021-03-29 14:36:16 +01:00
{
public override void Init(Campfire campfire, int id)
{
ObjectId = id;
AttachedObject = campfire;
}
2021-03-29 23:37:36 +01:00
public void StartRoasting()
2021-03-29 23:36:51 +01:00
=> AttachedObject
.GetType()
.GetMethod("StartRoasting", BindingFlags.NonPublic | BindingFlags.Instance)
.Invoke(AttachedObject, null);
2021-03-29 23:41:12 +01:00
public Campfire.State GetState()
=> AttachedObject.GetState();
2021-03-29 23:37:36 +01:00
public void SetState(Campfire.State newState)
2021-03-29 14:36:16 +01:00
=> AttachedObject.SetState(newState);
}
}