Files
AIC-Project/Client/Assets/Framework/Shared/Capabilities.cs
T
2026-07-10 10:24:29 +08:00

28 lines
649 B
C#

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);
}
}