DragnMaw
Member
public void Despawn()
{
Delete();
}
public class SpawnTime : Timer
{
public static void Initialize()
{
new SpawnTime().Start();
}
public SpawnTime() : base(TimeSpan.FromMinutes(60))
{
Priority = TimerPriority.OneMinute;
}
public static void OnTick()
{
DemonicSamurai.Despawn();
}
}
Theres the relevent parts of the code. I'm trying to make a mobile only live for 60 minutes, it just keeps erroring out with that error, or "error CS0120: An object reference is required for the non-static field, method, or property 'Mobile.Delete()'" if I set it to public static void Despawn(). I'm guessing I need to pass something from the OnTick to the Despawn, but I have no idea the easiest way to do what I am trying. And I just know this is going to be something really easy to solve.
{
Delete();
}
public class SpawnTime : Timer
{
public static void Initialize()
{
new SpawnTime().Start();
}
public SpawnTime() : base(TimeSpan.FromMinutes(60))
{
Priority = TimerPriority.OneMinute;
}
public static void OnTick()
{
DemonicSamurai.Despawn();
}
}
Theres the relevent parts of the code. I'm trying to make a mobile only live for 60 minutes, it just keeps erroring out with that error, or "error CS0120: An object reference is required for the non-static field, method, or property 'Mobile.Delete()'" if I set it to public static void Despawn(). I'm guessing I need to pass something from the OnTick to the Despawn, but I have no idea the easiest way to do what I am trying. And I just know this is going to be something really easy to solve.