refactoring: heap -> span
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game.Source;
|
||||
|
||||
public class GameAuthorizer: AuthorizationManager
|
||||
{
|
||||
public override bool OnAuthorize(uint peerId, byte[] payload)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game.Source
|
||||
{
|
||||
public class GameFactory : PluginFactory
|
||||
{
|
||||
public string PluginName { get; set; } = "ExamplePlugin";
|
||||
public PluginBase CreatePlugin(string map) => new ExamplePlugin();
|
||||
public AuthorizationManager CreateManager() => new GameAuthorizer();
|
||||
}
|
||||
}
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
using NLog;
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game.Source
|
||||
{
|
||||
public class ExamplePlugin: PluginBase
|
||||
{
|
||||
private ILogger _logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
_logger.Info("Plugin started");
|
||||
}
|
||||
|
||||
public override void OnStop()
|
||||
{
|
||||
_logger.Info("Plugin stopped");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user