feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
This commit is contained in:
26
ServerCore/LuBan/ConfigSingleton.cs
Normal file
26
ServerCore/LuBan/ConfigSingleton.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Luban;
|
||||
using MrWu;
|
||||
using Server.Core;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public interface IConfigSingleton
|
||||
{
|
||||
void LoadData(byte[] data);
|
||||
}
|
||||
|
||||
public abstract class ConfigSingleton<T> : SingleInstance<T>,IConfigSingleton where T : ConfigSingleton<T>,new()
|
||||
{
|
||||
/// <summary>
|
||||
/// 重新加载
|
||||
/// </summary>
|
||||
public abstract void ReLoadData();
|
||||
|
||||
public void LoadData(byte[] data)
|
||||
{
|
||||
LoadData(new ByteBuf(data));
|
||||
}
|
||||
|
||||
protected abstract void LoadData(ByteBuf _buf);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user