水岸东方

This commit is contained in:
bob
2025-07-04 17:25:10 +08:00
parent d7916515fd
commit e4c3feb033
7 changed files with 61 additions and 17 deletions

View File

@@ -1,10 +1,17 @@
using Fantasy;
using Fantasy.Assembly;
using Fantasy.ConfigTable;
using Fantasy.DataBase;
using Fantasy.Helper;
using Fantasy.IdFactory;
using Fantasy.Platform.Net;
//Scene 255
//gate 20个以内
//游戏服 1个
//Addressable管理中心 一个
//游戏服 50个内
//聊天服 1个1
// 设置配置表的路径
ConfigTableHelper.Initialize("../../../Config/Binary");
// 设置ID生成规则
@@ -21,14 +28,10 @@ MachineConfigData.Initialize(machineConfigText);
ProcessConfigData.Initialize(processConfigText);
WorldConfigData.Initialize(worldConfigText);
SceneConfigData.Initialize(sceneConfigText);
// 注册日志模块到框架
// 开发者可以自己注册日志系统到框架只要实现Fantasy.ILog接口就可以。
// 这里用的是NLog日志系统注册到框架中。
Fantasy.Log.Register(new Fantasy.NLog("Server"));
// 初始化框架,添加程序集到框架中
await Fantasy.Platform.Net.Entry.Initialize(Fantasy.AssemblyHelper.Assemblies);
// 启动Fantasy.Net
await Fantasy.Platform.Net.Entry.Start();
// 也可以使用下面的Start方法来初始化并且启动Fantasy.Net
// 使用下面这个方法就不用使用上面的两个方法了。
// await Fantasy.Platform.Net.Entry.Start(Fantasy.AssemblyHelper.Assemblies);
Log.Register(new Fantasy.NLog("Server"));
await Entry.Start(AssemblyHelper.Assemblies);