milimoe 082ce3b6f5
添加插件加载器和事件触发方法组 (#54)
* Add PluginLoader

* 删除event返回值

* 添加插件触发器(方法组)

* 删除冗余方法

* 将typeof(GetType())改写为this is

* 删除无用引用
2023-09-24 13:06:10 +08:00

41 lines
1.0 KiB
C#

using Milimoe.FunGame.Core.Interface;
using Milimoe.FunGame.Core.Library.Common.Event;
namespace Milimoe.FunGame.Core.Library.Common.Plugin
{
/// <summary>
/// 必须继承基类:<see cref="BasePlugin"/><para/>
/// 继承事件接口并实现其方法来使插件生效。例如继承:<seealso cref="ILoginEvent"/>
/// </summary>
public class Example : BasePlugin, ILoginEvent
{
public override string Name => "FunGame Example Plugin";
public override string Description => "My First Plugin";
public override string Version => "1.0.0";
public override string Author => "FunGamer";
public void AfterLoginEvent(object sender, LoginEventArgs e)
{
}
public void BeforeLoginEvent(object sender, LoginEventArgs e)
{
}
public void FailedLoginEvent(object sender, LoginEventArgs e)
{
}
public void SucceedLoginEvent(object sender, LoginEventArgs e)
{
}
}
}