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