Initial commit: Client Doc docs Server Tools

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ud18010
2026-07-10 10:24:29 +08:00
co-authored by Cursor
commit 7e35d8da31
3374 changed files with 680813 additions and 0 deletions
@@ -0,0 +1,25 @@
namespace XWorld.Framework
{
// 资源加载抽象,避免共享层引用 UnityEngine;客户端实现里再转成具体 Unity 对象。
// 统一异步:客户端薄层按需从 CDN 下载并在 onLoaded 回调里返回对象(失败回调 null)。
public interface IAssetLoader
{
void Load(string path, System.Action<object> onLoaded); // 结果由客户端薄层按需强转
}
public interface IGameClientCtx
{
IAssetLoader Assets { get; }
ILogger Logger { get; }
void Send(NetMessage message); // 发往服务端(Game 通道)
void Exit(); // 请求退出当前小游戏
}
public interface IGameClient
{
void OnEnter(IGameClientCtx ctx);
void OnNetMessage(NetMessage message);
void OnUpdate(float deltaTime);
void OnExit();
}
}