骑砍2霸主MOD开发(26)-Mono脚本系统
一.游戏启动流程
<1.启动器Launcher
运行TaleWorlds.MountAndBlade.Launcher.exe启动C#程序Program,完成MOD列表页面的加载.
public class Program
{public static void Main(string[] args){#加载启动器GUI界面ResourceDepot resourceDepot = new ResourceDepot();resourceDepot.AddLocation(BasePath.Name, "Modules/Native/LauncherGUI/");resourceDepot.CollectResources();resourceDepot.StartWatchingChangesInDepot();#点击确定后拉起主进程if (Program._gameStarted){LauncherPlatform.SetLauncherMode(false);Program.Main(Program._args.ToArray());}}
}
<2.Application主进程
点击确定后,RGL引擎根据Platform平台(Steam/EPIC)拉起WOTS应用主进程,完成MONO运行时环境创建,系统资源加载.
p