mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 12:09:34 +08:00
加载项系统,修改 AfterLoad 参数列表
This commit is contained in:
parent
d23c6597d1
commit
7d6ad5bc84
@ -65,7 +65,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
// 读取模组的依赖集合
|
// 读取模组的依赖集合
|
||||||
module.GameModuleDepend.GetDependencies(loader);
|
module.GameModuleDepend.GetDependencies(loader);
|
||||||
// 如果模组加载后需要执行代码,请重写AfterLoad方法
|
// 如果模组加载后需要执行代码,请重写AfterLoad方法
|
||||||
module.AfterLoad(loader);
|
module.AfterLoad(loader, otherobjs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (runtime == FunGameInfo.FunGame.FunGame_Server)
|
else if (runtime == FunGameInfo.FunGame.FunGame_Server)
|
||||||
@ -75,7 +75,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
foreach (GameModuleServer server in loader.ModuleServers.Values.ToList())
|
foreach (GameModuleServer server in loader.ModuleServers.Values.ToList())
|
||||||
{
|
{
|
||||||
server.GameModuleDepend.GetDependencies(loader);
|
server.GameModuleDepend.GetDependencies(loader);
|
||||||
server.AfterLoad(loader);
|
server.AfterLoad(loader, otherobjs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return loader;
|
return loader;
|
||||||
|
@ -35,7 +35,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
foreach (Plugin plugin in loader.Plugins.Values.ToList())
|
foreach (Plugin plugin in loader.Plugins.Values.ToList())
|
||||||
{
|
{
|
||||||
// 如果插件加载后需要执行代码,请重写AfterLoad方法
|
// 如果插件加载后需要执行代码,请重写AfterLoad方法
|
||||||
plugin.AfterLoad(loader);
|
plugin.AfterLoad(loader, otherobjs);
|
||||||
}
|
}
|
||||||
return loader;
|
return loader;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
foreach (ServerPlugin plugin in loader.Plugins.Values.ToList())
|
foreach (ServerPlugin plugin in loader.Plugins.Values.ToList())
|
||||||
{
|
{
|
||||||
// 如果插件加载后需要执行代码,请重写AfterLoad方法
|
// 如果插件加载后需要执行代码,请重写AfterLoad方法
|
||||||
plugin.AfterLoad(loader);
|
plugin.AfterLoad(loader, otherobjs);
|
||||||
}
|
}
|
||||||
return loader;
|
return loader;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
foreach (WebAPIPlugin plugin in loader.Plugins.Values.ToList())
|
foreach (WebAPIPlugin plugin in loader.Plugins.Values.ToList())
|
||||||
{
|
{
|
||||||
// 如果插件加载后需要执行代码,请重写AfterLoad方法
|
// 如果插件加载后需要执行代码,请重写AfterLoad方法
|
||||||
plugin.AfterLoad(loader);
|
plugin.AfterLoad(loader, otherobjs);
|
||||||
}
|
}
|
||||||
return loader;
|
return loader;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
using Milimoe.FunGame.Core.Controller;
|
using Milimoe.FunGame.Core.Controller;
|
||||||
using Milimoe.FunGame.Core.Interface;
|
using Milimoe.FunGame.Core.Interface;
|
||||||
using Milimoe.FunGame.Core.Interface.Addons;
|
using Milimoe.FunGame.Core.Interface.Addons;
|
||||||
@ -140,7 +141,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Addon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 模组完全加载后需要做的事
|
/// 模组完全加载后需要做的事
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void AfterLoad(params object[] args)
|
public virtual void AfterLoad(GameModuleLoader loader, params object[] args)
|
||||||
{
|
{
|
||||||
// override
|
// override
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Controller;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Controller;
|
||||||
using Milimoe.FunGame.Core.Interface;
|
using Milimoe.FunGame.Core.Interface;
|
||||||
using Milimoe.FunGame.Core.Interface.Addons;
|
using Milimoe.FunGame.Core.Interface.Addons;
|
||||||
using Milimoe.FunGame.Core.Library.Common.Event;
|
using Milimoe.FunGame.Core.Library.Common.Event;
|
||||||
@ -81,7 +82,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Addon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 插件完全加载后需要做的事
|
/// 插件完全加载后需要做的事
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void AfterLoad(params object[] objs)
|
public virtual void AfterLoad(PluginLoader loader, params object[] objs)
|
||||||
{
|
{
|
||||||
// override
|
// override
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Controller;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Controller;
|
||||||
using Milimoe.FunGame.Core.Interface;
|
using Milimoe.FunGame.Core.Interface;
|
||||||
using Milimoe.FunGame.Core.Interface.Addons;
|
using Milimoe.FunGame.Core.Interface.Addons;
|
||||||
using Milimoe.FunGame.Core.Library.Common.Event;
|
using Milimoe.FunGame.Core.Library.Common.Event;
|
||||||
@ -84,7 +85,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Addon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 插件完全加载后需要做的事
|
/// 插件完全加载后需要做的事
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void AfterLoad(params object[] objs)
|
public virtual void AfterLoad(ServerPluginLoader loader, params object[] objs)
|
||||||
{
|
{
|
||||||
// override
|
// override
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Controller;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Controller;
|
||||||
using Milimoe.FunGame.Core.Interface.Addons;
|
using Milimoe.FunGame.Core.Interface.Addons;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Library.Common.Addon
|
namespace Milimoe.FunGame.Core.Library.Common.Addon
|
||||||
@ -80,7 +81,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Addon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 插件完全加载后需要做的事
|
/// 插件完全加载后需要做的事
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void AfterLoad(params object[] objs)
|
public virtual void AfterLoad(WebAPIPluginLoader loader, params object[] objs)
|
||||||
{
|
{
|
||||||
// override
|
// override
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user