Modules
A module is a small class that can be used to bundle up a set of related components behind a ‘facade’ to simplify configuration and deployment.
//IModule
namespace FigNet.Core
{
public interface IModule
{
void Load(IServer server);
void Process(float deltaTime); // gets call per frame
void UnLoad();
}
}How to create a Module
public class TestModule : IModule
{
// here define your properties & logic
public void Load(IServer server)
{
FN.Logger.Info("test loaded");
FN.HandlerCollection.RegisterHandler(new TestHandler());
}
public void Process(float deltaTime)
{
}
public void UnLoad()
{
}
}How to load a Module
How to manually load the module
Last updated