Initial commit: Client Doc docs Server Tools
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace XWorld.Framework
|
||||
{
|
||||
// 服务端权威随机 / 客户端用服务端下发的种子复现
|
||||
public interface IRandom
|
||||
{
|
||||
int Next(int maxExclusive); // 返回 [0, maxExclusive)
|
||||
}
|
||||
|
||||
public interface ITimer
|
||||
{
|
||||
float Now { get; } // 单调递增的秒
|
||||
}
|
||||
|
||||
public interface ILogger
|
||||
{
|
||||
void Info(string message);
|
||||
void Warn(string message);
|
||||
void Error(string message);
|
||||
}
|
||||
|
||||
// 仅服务端注入;客户端 ctx 不提供
|
||||
public interface IStorage
|
||||
{
|
||||
byte[] Load(string key); // 不存在返回 null
|
||||
void Save(string key, byte[] data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user