主题
EngineInterface.BaseType
ActorDisappearType 双端
命名空间 EngineInterface.BaseType
csharp
public enum ActorDisappearType枚举值
NormalDestroy
AdminOperationMessage 双端
命名空间 EngineInterface.BaseType
csharp
public sealed class AdminOperationMessage后台 operation 消息。
备注
该消息来自网站后台发布到当前游戏主地图的管理频道。 Host 会原生处理关服类 operation;游戏逻辑可监听该消息来实现公告弹窗或其它自定义后台指令。
构造函数
AdminOperationMessage 双端
csharp
public AdminOperationMessage()属性
Operation 双端
csharp
public required string Operation { get; init; }后台 operation 名称,例如 notice、shutdown、shutdown_now。
Content 双端
csharp
public string Content { get; init; }后台传入的文本内容;当内容不是字符串或未设置时为空字符串。
GameSessionId 双端
csharp
public long? GameSessionId { get; init; }后台消息指定的游戏局 ID;未指定时为 null。
RawMessage 双端
csharp
public byte[] RawMessage { get; init; }原始后台消息体,格式为 msgpack,可用于自定义解析额外字段。
AnimationBracketPlayParam 双端
命名空间 EngineInterface.BaseType
csharp
public class AnimationBracketPlayParam构造函数
AnimationBracketPlayParam 双端
csharp
public AnimationBracketPlayParam()属性
LogicLayer 双端
csharp
public AnimationLogicLayer LogicLayer { get; set; }Priority 双端
csharp
public int Priority { get; set; }动画的优先级。
备注
有效范围为 0-31。低于 0 的值会按 0 处理,高于 31 的值会按 31 处理。 当 Actor 上有多个动画实例共存时,优先级越高的动画会取胜并转入播放状态,其余动画则会被压制。
BirthAnimation 双端
csharp
public UTF8String BirthAnimation { get; set; }StandAnimation 双端
csharp
public UTF8String StandAnimation { get; set; }DeathAnimation 双端
csharp
public UTF8String DeathAnimation { get; set; }ForceOneShot 双端
csharp
public bool ForceOneShot { get; set; }KillOnFinish 双端
csharp
public bool KillOnFinish { get; set; }SkipBirthAnimation 双端
csharp
public bool SkipBirthAnimation { get; set; }AnimationPlayParam 双端
命名空间 EngineInterface.BaseType
csharp
public class AnimationPlayParam构造函数
AnimationPlayParam 双端
csharp
public AnimationPlayParam()属性
LogicLayer 双端
csharp
public AnimationLogicLayer LogicLayer { get; set; }Priority 双端
csharp
public int Priority { get; set; }动画的优先级。
备注
有效范围为 0-31。低于 0 的值会按 0 处理,高于 31 的值会按 31 处理。 当 Actor 上有多个动画实例共存时,优先级越高的动画会取胜并转入播放状态,其余动画则会被压制。
BodyPart 双端
csharp
public AnimationBodyPart BodyPart { get; set; }Speed 双端
csharp
public float Speed { get; set; }BlendIn 双端
csharp
public TimeSpan BlendIn { get; set; }动画的混入时间。
备注
不管是当一个动画结束播放,另一个动画因此成为最高优先级的动画而“浮现”时,或者一个旧动画实例被新的优先级更高的动画实例压制时,又或者是用户动态修改了动画的优先级而导致一个被压制的动画重新“浮现”时——在任何两个浮现在表面的动画进行交接的时候,引擎不会突兀地将一个前一个动画切换到后一个动画,而是会在一小段时间内将两个动画混合到一起,平滑地过度到新的动画中。 通过设置混合时间参数,用户可以指定动画实例作为新动画浮现时与旧动画之间的混合时间,单位为秒。该参数若不填写,则默认为0.15秒。设置为0可令动画立刻切换。
StartOffset 双端
csharp
public TimeSpan StartOffset { get; set; }IsLooping 双端
csharp
public bool IsLooping { get; set; }BoundingBox 双端
命名空间 EngineInterface.BaseType
csharp
public struct BoundingBox : IEquatable<BoundingBox>属性
Min 双端
csharp
public Vector3 Min { get; set; }Max 双端
csharp
public Vector3 Max { get; set; }方法
ToString 双端
csharp
public override readonly string ToString()operator != 双端
csharp
public static bool operator !=(BoundingBox left, BoundingBox right)operator == 双端
csharp
public static bool operator ==(BoundingBox left, BoundingBox right)GetHashCode 双端
csharp
public override readonly int GetHashCode()Equals 双端
csharp
public override readonly bool Equals(object obj)Equals 双端
csharp
public readonly bool Equals(BoundingBox other)ClientBatteryHealth 双端
命名空间 EngineInterface.BaseType
csharp
public enum ClientBatteryHealthDescribes the reported health of the local device battery.
枚举值
Unknown— The current battery health is unavailable.Good— The battery health is reported as good.Dead— The battery is reported as unable to hold charge normally.OverVoltage— The battery voltage is reported as too high.Overheat— The battery temperature is reported as too high.
ClientBatteryInfo 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct ClientBatteryInfo : IEquatable<ClientBatteryInfo>Current local battery details.
LevelPercent— Battery level from 0 to 100, ornullwhen the value is unavailable.Scale— Battery level scale reported by the platform; 0 when unavailable.VoltageMillivolts— Battery voltage in millivolts; 0 when unavailable.TemperatureTenthsCelsius— Battery temperature in tenths of a Celsius degree; 0 when unavailable.Status— Battery charging status.Health— Battery health status.
构造函数
ClientBatteryInfo 双端
csharp
public ClientBatteryInfo(int? LevelPercent, int Scale, int VoltageMillivolts, int TemperatureTenthsCelsius, ClientBatteryStatus Status, ClientBatteryHealth Health)Current local battery details.
LevelPercent— Battery level from 0 to 100, ornullwhen the value is unavailable.Scale— Battery level scale reported by the platform; 0 when unavailable.VoltageMillivolts— Battery voltage in millivolts; 0 when unavailable.TemperatureTenthsCelsius— Battery temperature in tenths of a Celsius degree; 0 when unavailable.Status— Battery charging status.Health— Battery health status.
属性
LevelPercent 双端
csharp
public int? LevelPercent { get; init; }Battery level from 0 to 100, or null when the value is unavailable.
Scale 双端
csharp
public int Scale { get; init; }Battery level scale reported by the platform; 0 when unavailable.
VoltageMillivolts 双端
csharp
public int VoltageMillivolts { get; init; }Battery voltage in millivolts; 0 when unavailable.
TemperatureTenthsCelsius 双端
csharp
public int TemperatureTenthsCelsius { get; init; }Battery temperature in tenths of a Celsius degree; 0 when unavailable.
Status 双端
csharp
public ClientBatteryStatus Status { get; init; }Battery charging status.
Health 双端
csharp
public ClientBatteryHealth Health { get; init; }Battery health status.
方法
ToString 双端
csharp
public override string ToString()operator != 双端
csharp
public static bool operator !=(ClientBatteryInfo left, ClientBatteryInfo right)operator == 双端
csharp
public static bool operator ==(ClientBatteryInfo left, ClientBatteryInfo right)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public override bool Equals(object obj)Equals 双端
csharp
public bool Equals(ClientBatteryInfo other)Deconstruct 双端
csharp
public void Deconstruct(out int? LevelPercent, out int Scale, out int VoltageMillivolts, out int TemperatureTenthsCelsius, out ClientBatteryStatus Status, out ClientBatteryHealth Health)ClientBatteryStatus 双端
命名空间 EngineInterface.BaseType
csharp
public enum ClientBatteryStatusDescribes the local battery charging status.
枚举值
Unknown— The current battery status is unavailable.Charging— The battery is charging.Discharging— The battery is discharging.NotCharging— The battery is connected but not currently charging.Full— The battery is full.
ClientDiagnosticsSnapshot 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct ClientDiagnosticsSnapshot : IEquatable<ClientDiagnosticsSnapshot>Read-only diagnostics snapshot for the local client.
FramesPerSecond— Current rendered frames per second.PingMilliseconds— Current network ping in milliseconds.PhysicalMemoryBytes— Current physical memory usage in bytes.DrawCalls— Current rendered draw call count.SentBytes— Total bytes sent by the client during the current session.PushedBytes— Total bytes received by the client during the current session.JankCount— Client-side jank count observed during the current session.
构造函数
ClientDiagnosticsSnapshot 双端
csharp
public ClientDiagnosticsSnapshot(int FramesPerSecond, int PingMilliseconds, long PhysicalMemoryBytes, int DrawCalls, long SentBytes, long PushedBytes, int JankCount)Read-only diagnostics snapshot for the local client.
FramesPerSecond— Current rendered frames per second.PingMilliseconds— Current network ping in milliseconds.PhysicalMemoryBytes— Current physical memory usage in bytes.DrawCalls— Current rendered draw call count.SentBytes— Total bytes sent by the client during the current session.PushedBytes— Total bytes received by the client during the current session.JankCount— Client-side jank count observed during the current session.
属性
FramesPerSecond 双端
csharp
public int FramesPerSecond { get; init; }Current rendered frames per second.
PingMilliseconds 双端
csharp
public int PingMilliseconds { get; init; }Current network ping in milliseconds.
PhysicalMemoryBytes 双端
csharp
public long PhysicalMemoryBytes { get; init; }Current physical memory usage in bytes.
DrawCalls 双端
csharp
public int DrawCalls { get; init; }Current rendered draw call count.
SentBytes 双端
csharp
public long SentBytes { get; init; }Total bytes sent by the client during the current session.
PushedBytes 双端
csharp
public long PushedBytes { get; init; }Total bytes received by the client during the current session.
JankCount 双端
csharp
public int JankCount { get; init; }Client-side jank count observed during the current session.
方法
ToString 双端
csharp
public override string ToString()operator != 双端
csharp
public static bool operator !=(ClientDiagnosticsSnapshot left, ClientDiagnosticsSnapshot right)operator == 双端
csharp
public static bool operator ==(ClientDiagnosticsSnapshot left, ClientDiagnosticsSnapshot right)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public override bool Equals(object obj)Equals 双端
csharp
public bool Equals(ClientDiagnosticsSnapshot other)Deconstruct 双端
csharp
public void Deconstruct(out int FramesPerSecond, out int PingMilliseconds, out long PhysicalMemoryBytes, out int DrawCalls, out long SentBytes, out long PushedBytes, out int JankCount)ClientNetworkInfo 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct ClientNetworkInfo : IEquatable<ClientNetworkInfo>Current local network status.
IsWifi— Whether the current connection is reported as Wi-Fi.
构造函数
ClientNetworkInfo 双端
csharp
public ClientNetworkInfo(bool IsWifi)Current local network status.
IsWifi— Whether the current connection is reported as Wi-Fi.
属性
IsWifi 双端
csharp
public bool IsWifi { get; init; }Whether the current connection is reported as Wi-Fi.
方法
ToString 双端
csharp
public override string ToString()operator != 双端
csharp
public static bool operator !=(ClientNetworkInfo left, ClientNetworkInfo right)operator == 双端
csharp
public static bool operator ==(ClientNetworkInfo left, ClientNetworkInfo right)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public override bool Equals(object obj)Equals 双端
csharp
public bool Equals(ClientNetworkInfo other)Deconstruct 双端
csharp
public void Deconstruct(out bool IsWifi)ClientPowerInfo 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct ClientPowerInfo : IEquatable<ClientPowerInfo>Current local power status.
BatteryPercent— Battery level from 0 to 100, ornullwhen the value is unavailable.TimeRemaining— Estimated remaining battery time, ornullwhen the value is unavailable.State— Current power state.
构造函数
ClientPowerInfo 双端
csharp
public ClientPowerInfo(int? BatteryPercent, TimeSpan? TimeRemaining, ClientPowerState State)Current local power status.
BatteryPercent— Battery level from 0 to 100, ornullwhen the value is unavailable.TimeRemaining— Estimated remaining battery time, ornullwhen the value is unavailable.State— Current power state.
属性
BatteryPercent 双端
csharp
public int? BatteryPercent { get; init; }Battery level from 0 to 100, or null when the value is unavailable.
TimeRemaining 双端
csharp
public TimeSpan? TimeRemaining { get; init; }Estimated remaining battery time, or null when the value is unavailable.
State 双端
csharp
public ClientPowerState State { get; init; }Current power state.
方法
ToString 双端
csharp
public override string ToString()operator != 双端
csharp
public static bool operator !=(ClientPowerInfo left, ClientPowerInfo right)operator == 双端
csharp
public static bool operator ==(ClientPowerInfo left, ClientPowerInfo right)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public override bool Equals(object obj)Equals 双端
csharp
public bool Equals(ClientPowerInfo other)Deconstruct 双端
csharp
public void Deconstruct(out int? BatteryPercent, out TimeSpan? TimeRemaining, out ClientPowerState State)ClientPowerState 双端
命名空间 EngineInterface.BaseType
csharp
public enum ClientPowerStateDescribes whether the local device is running from battery or external power.
枚举值
Unknown— The current power state is unavailable.OnBattery— The device is currently running on battery power.NoBattery— The device does not report a battery.Charging— The device battery is charging.Charged— The device battery is fully charged while connected to external power.
CloudDataListItemValueType 双端
命名空间 EngineInterface.BaseType
csharp
public enum CloudDataListItemValueType列表项 payload 的类型。列表项仍然使用 ListItem 作为外层操作类型, 该枚举只描述列表项内部保存的数据如何写入和解读。
枚举值
Raw— 裸字节 payload。对应既有 byte[] ListItem API。Utf8— UTF-8 字符串 payload。底层仍存入 list blob,包头 tag=Utf8。Double— 双精度浮点 payload。底层以 8 字节 IEEE754(小端)存入 list blob,包头 tag=Double。
CloudDataValue 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct CloudDataValue : IEquatable<CloudDataValue>表示云数据的值,支持字符串和数字类型
备注
这个结构体提供了类型安全的方式来存储和访问云数据值, 支持隐式转换和显式转换,确保数据类型的一致性。
构造函数
CloudDataValue 双端
csharp
public CloudDataValue(string value)创建字符串类型的云数据值
value— 字符串值
CloudDataValue 双端
csharp
public CloudDataValue(int value)创建整数类型的云数据值
value— 整数值
CloudDataValue 双端
csharp
public CloudDataValue(long value)创建数字类型的云数据值
value— 长整数值
CloudDataValue 双端
csharp
public CloudDataValue(double value)创建双精度浮点类型的云数据值(底层以 8 字节 IEEE754 存入 blob)
value— 双精度浮点值
属性
Type 双端
csharp
public CloudDataValueType Type { get; init; }值的类型
VarCharValue 双端
csharp
public VarChar255 VarCharValue { get; init; }最大长度为255的UTF8字符串值(当类型为VarChar255时)
BigIntValue 双端
csharp
public long BigIntValue { get; init; }数字值(当类型为BigInt时)
BlobValue 双端
csharp
public UTF8String BlobValue { get; init; }Blob数据值 (当类型为Blob时)
DoubleValue 双端
csharp
public double DoubleValue { get; init; }双精度浮点值(当类型为 Double 时)。底层以 8 字节 IEEE754 存入 blob(包头 tag=Double)。
ListItemValueType 双端
csharp
public CloudDataListItemValueType ListItemValueType { get; init; }列表项 payload 的类型(当 Type 为 ListItem 时有效)。
方法
implicit operator 双端
csharp
public static CloudDataValue implicit operator(string value)隐式转换:从字符串创建CloudDataValue
value— 字符串值
返回: CloudDataValue实例
implicit operator 双端
csharp
public static CloudDataValue implicit operator(int value)隐式转换:从int创建CloudDataValue
value— 整数值
返回: CloudDataValue实例
implicit operator 双端
csharp
public static CloudDataValue implicit operator(long value)隐式转换:从long创建CloudDataValue
value— 长整数值
返回: CloudDataValue实例
explicit operator 双端
csharp
public static string explicit operator(CloudDataValue value)显式转换:转换为字符串
value— CloudDataValue实例
返回: 字符串值
ToString 双端
csharp
public override string ToString()获取值的字符串表示
返回: 字符串表示
Equals 双端
csharp
public bool Equals(CloudDataValue other)检查两个CloudDataValue是否相等
other— 另一个CloudDataValue
返回: 是否相等
Equals 双端
csharp
public override bool Equals(object? obj)检查与另一个对象是否相等
obj— 另一个对象
返回: 是否相等
GetHashCode 双端
csharp
public override int GetHashCode()获取哈希码
返回: 哈希码
operator == 双端
csharp
public static bool operator ==(CloudDataValue left, CloudDataValue right)相等运算符
left— 左操作数right— 右操作数
返回: 是否相等
operator != 双端
csharp
public static bool operator !=(CloudDataValue left, CloudDataValue right)不等运算符
left— 左操作数right— 右操作数
返回: 是否不相等
CloudDataValueType 双端
命名空间 EngineInterface.BaseType
csharp
public enum CloudDataValueType云数据值的类型枚举
枚举值
Unknown— 当从云数据中获取数据时,云数据的类型未知,需要从数据中解析。VarChar255— 变长UTF8字符类型,最大长度为255个字符。对应常见的SQL VARCHAR(255)。BigInt— 64位长整型,通常用于存储数字或整数值。对应常见的SQL BIGINT。Blob— 二进制大对象类型,通常用于存储任意二进制数据。对应常见的SQL BLOB。ListItem— 列表项类型,通常用于存储列表或集合数据。相同Key的多个值可以存储为列表项。每个列表项都有一个唯一的UUID。 BlobValue用于存储列表项的值,BigIntValue用于标识列表项UUID。ClaimedName— 名称类型,通常用于存储用户或实体的名称。可以是用户自定义的名称或系统生成的名称。被占用的名称在删除前无法被重复占用。Utf8Blob— UTF-8 字符串,但以 blob 形式存储(不受 VarChar255 的 255 字符限制)。底层落 score 子系统、包头 tag=Utf8。Double— 双精度浮点。底层以 8 字节 IEEE754(小端)存入 blob、包头 tag=Double。补齐 1.0 可存小数、2.0 一度缺失的能力。
ControllerType 双端
命名空间 EngineInterface.BaseType
csharp
public enum ControllerType玩家槽位的控制器类型,决定该槽位由真人还是电脑控制。
枚举值
User— 真人玩家槽位。可被客户端连入,服务端创建 , 拥有 信息(UserId/Name),支持连接状态变化和消息传输。Computer— 电脑玩家槽位。服务端创建 ,始终视为在线(Status 恒为 Connected), 没有 信息,向其发送消息会被静默丢弃,不可被真人客户端连入。
CoreActorType 双端
命名空间 EngineInterface.BaseType
csharp
public enum CoreActorTypeDefines the core types of actors in the engine's actor system, used for categorization and behavior management.
备注
This enum categorizes the fundamental actor types within the engine, allowing systems to apply type-specific logic, optimizations, and management strategies. Each type represents a different category of game object with distinct lifecycle and synchronization requirements.
枚举值
Unit— Represents a unit actor, which is the default and most common actor type.Game— Represents a game-level actor that manages global game state and functionality.Player— Represents a player actor that manages individual player state and interactions.ActorScopePersist— Represents a persistent actor scope that maintains long-term actor group management.PropertyObject— Represents a property object for custom data synchronization without scene representation.
JoinPolicy 双端
命名空间 EngineInterface.BaseType
csharp
public enum JoinPolicy枚举值
ClosedOpen
NameClaimStatus 双端
命名空间 EngineInterface.BaseType
csharp
public record NameClaimStatus构造函数
NameClaimStatus 双端
csharp
protected NameClaimStatus(NameClaimStatus original)NameClaimStatus 双端
csharp
public NameClaimStatus()属性
EqualityContract 双端
csharp
protected virtual Type EqualityContract { get; }IsClaimed 双端
csharp
public bool IsClaimed { get; init; }Record 双端
csharp
public INameRecord? Record { get; init; }方法
ToString 双端
csharp
public override string ToString()PrintMembers 双端
csharp
protected virtual bool PrintMembers(StringBuilder builder)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public virtual bool Equals(NameClaimStatus? other)OpenGameRef 双端
命名空间 EngineInterface.BaseType
csharp
public sealed class OpenGameRef : IEquatable<OpenGameRef>构造函数
OpenGameRef 双端
csharp
public OpenGameRef(string MapName, string JoinKey, long? GameSessionId = null, JoinPolicy JoinPolicy = JoinPolicy.Open)属性
MapName 双端
csharp
public string MapName { get; init; }JoinKey 双端
csharp
public string JoinKey { get; init; }GameSessionId 双端
csharp
public long? GameSessionId { get; init; }JoinPolicy 双端
csharp
public JoinPolicy JoinPolicy { get; init; }方法
ToString 双端
csharp
public override string ToString()operator != 双端
csharp
public static bool operator !=(OpenGameRef? left, OpenGameRef? right)operator == 双端
csharp
public static bool operator ==(OpenGameRef? left, OpenGameRef? right)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public override bool Equals(object? obj)Equals 双端
csharp
public bool Equals(OpenGameRef? other)Deconstruct 双端
csharp
public void Deconstruct(out string MapName, out string JoinKey, out long? GameSessionId, out JoinPolicy JoinPolicy)OperationMailQueryResult 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct OperationMailQueryResultRepresents the result of an operation mail query.
属性
Result 双端
csharp
public OperationMailResult Result { get; }Gets the query result code.
Records 双端
csharp
public IReadOnlyList<OperationMailRecord>? Records { get; }Gets the returned operation mail records when the query succeeds.
ErrorCode 双端
csharp
public int? ErrorCode { get; }Gets the raw backend error code when one is available.
ErrorInfo 双端
csharp
public string? ErrorInfo { get; }Gets the raw backend error message when one is available.
IsSuccess 双端
csharp
public bool IsSuccess { get; }Gets whether the query succeeded.
方法
Success 双端
csharp
public static OperationMailQueryResult Success(IEnumerable<OperationMailRecord> records)Creates a successful query result.
records— The returned operation mail records. Empty collections are valid.
返回: A successful query result.
Fail 双端
csharp
public static OperationMailQueryResult Fail(OperationMailResult result, int? errorCode = null, string? errorInfo = null)Creates a failed query result.
result— The failure result code.errorCode— The optional raw backend error code.errorInfo— The optional raw backend error message.
返回: A failed query result.
OperationMailRecord 双端
命名空间 EngineInterface.BaseType
csharp
public sealed class OperationMailRecord : IEquatable<OperationMailRecord>Describes one operation mail record returned by the backend.
备注
Operation mails are messages delivered by the operation backend or system services to players. They are not player-to-player mail records.
构造函数
OperationMailRecord 双端
csharp
public OperationMailRecord()属性
Id 双端
csharp
public long Id { get; init; }Gets the record id from the queried table.
AdminEmailId 双端
csharp
public long AdminEmailId { get; init; }Gets the source admin mail id. For global mails this is the same as Id.
Uuid 双端
csharp
public string Uuid { get; init; }Gets the backend mail uuid.
Title 双端
csharp
public string Title { get; init; }Gets the mail title.
Content 双端
csharp
public string Content { get; init; }Gets the mail body content.
SenderName 双端
csharp
public string SenderName { get; init; }Gets the display name of the sender configured by the operation backend.
ContentType 双端
csharp
public int ContentType { get; init; }Gets the backend content type value.
Attachment 双端
csharp
public string Attachment { get; init; }Gets the raw backend attachment payload.
ReceiveType 双端
csharp
public int ReceiveType { get; init; }Gets the backend receive type value.
StartTime 双端
csharp
public DateTime StartTime { get; init; }Gets the start time of the mail validity window in UTC.
EndTime 双端
csharp
public DateTime EndTime { get; init; }Gets the end time of the mail validity window in UTC.
IncludeNewPlayer 双端
csharp
public bool IncludeNewPlayer { get; init; }Gets whether this global operation mail includes players who joined after the mail started.
备注
The backend stores the inverse value in include_new_player: 1 excludes new players, while 0 includes them. The low-level query API does not decide whether a specific player should see the mail.
Source 双端
csharp
public int Source { get; init; }Gets the backend source value.
Env 双端
csharp
public string Env { get; init; }Gets the backend environment that produced the record.
方法
ToString 双端
csharp
public override string ToString()operator != 双端
csharp
public static bool operator !=(OperationMailRecord? left, OperationMailRecord? right)operator == 双端
csharp
public static bool operator ==(OperationMailRecord? left, OperationMailRecord? right)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public override bool Equals(object? obj)Equals 双端
csharp
public bool Equals(OperationMailRecord? other)PhysicsRaycastResult 双端
命名空间 EngineInterface.BaseType
csharp
public struct PhysicsRaycastResult : IEquatable<PhysicsRaycastResult>Should use GetRigidBody() extension method to get the RigidBody object, otherwise you have no way to fetch it. using GameGraph.NodeSystem to get that extension method.
属性
Position 双端
csharp
public Vector3 Position { get; set; }位置
Normal 双端
csharp
public Vector3 Normal { get; set; }Hit worldspace normal.
Distance 双端
csharp
public float Distance { get; set; }Hit distance from ray origin.
HitFraction 双端
csharp
public float HitFraction { get; set; }Hit fraction.
方法
ToString 双端
csharp
public override readonly string ToString()operator != 双端
csharp
public static bool operator !=(PhysicsRaycastResult left, PhysicsRaycastResult right)operator == 双端
csharp
public static bool operator ==(PhysicsRaycastResult left, PhysicsRaycastResult right)GetHashCode 双端
csharp
public override readonly int GetHashCode()Equals 双端
csharp
public override readonly bool Equals(object obj)Equals 双端
csharp
public readonly bool Equals(PhysicsRaycastResult other)PropertyHashKeyValue 双端
命名空间 EngineInterface.BaseType
csharp
public struct PropertyHashKeyValue字段
Key 双端
csharp
public long KeyValue 双端
csharp
public double ValuePropertyHashKeyValueBytes 双端
命名空间 EngineInterface.BaseType
csharp
public struct PropertyHashKeyValueBytes字段
Key 双端
csharp
public long KeyValue 双端
csharp
public UTF8String ValueRecordFoundStatus 双端
命名空间 EngineInterface.BaseType
csharp
public class RecordFoundStatus<T> where T : notnull属性
IsFound 双端
csharp
public bool IsFound { get; init; }NotFound 双端
csharp
public static RecordFoundStatus<T> NotFound { get; }Record 双端
csharp
public T? Record { get; init; }方法
implicit operator 双端
csharp
public static RecordFoundStatus<T> implicit operator(T record)Found 双端
csharp
public static RecordFoundStatus<IListItemRecord> Found(IListItemRecord listItemRecord)SyncType 双端
命名空间 EngineInterface.BaseType
csharp
public enum SyncType枚举值
None = 0Self = 1Ally = 2All = 4Sight = 8SelfOrSight = 0x10AllyOrSight = 0x20
TransactionOperation 双端
命名空间 EngineInterface.BaseType
csharp
public class TransactionOperation事务操作
备注
表示事务中的单个操作,包含操作类型、键、值等信息。
构造函数
TransactionOperation 双端
csharp
public TransactionOperation()属性
UserId 双端
csharp
public long UserId { get; set; }Type 双端
csharp
public TransactionOperationType Type { get; set; }操作类型
Key 双端
csharp
public VarChar180 Key { get; set; }数据键,小于180个字符的UTF8字符串
Value 双端
csharp
public CloudDataValue Value { get; set; }数据值
ResetOption 双端
csharp
public UserDataResetOption? ResetOption { get; set; }NewCap 双端
csharp
public long NewCap { get; set; }条件值(仅用于 CappedModify 操作,使增加后的数值不大于限制值)
方法
SetBlob 双端
csharp
public static TransactionOperation SetBlob(long userId, string key, byte[] data)创建设置Blob操作
userId— 用户IDkey— 数据键data— 数据值
返回: 事务操作
SetUtf8Blob 双端
csharp
public static TransactionOperation SetUtf8Blob(long userId, string key, string value)创建设置 UTF-8 字符串(以 blob 存储)操作。不受 VarChar255 的 255 字符限制, 后台可编辑。
userId— 用户IDkey— 数据键value— UTF-8 字符串值
返回: 事务操作
SetDoubleBlob 双端
csharp
public static TransactionOperation SetDoubleBlob(long userId, string key, double value)创建设置双精度浮点(以 8 字节 IEEE754 存入 blob)操作。补齐小数云变量能力, 后台可编辑。
userId— 用户IDkey— 数据键value— 双精度浮点值
返回: 事务操作
DeleteBlob 双端
csharp
public static TransactionOperation DeleteBlob(long userId, string key)创建删除Blob操作
userId— 用户IDkey— 数据键
返回: 事务操作
UpdateListItem 双端
csharp
public static TransactionOperation UpdateListItem(long userId, long itemId, byte[] data)Creates a transaction operation to update a list item with the specified item ID and data.
userId— 用户IDitemId— The globally unique identifier of the list item to update.data— The data to associate with the list item. Cannot be null.
返回: A TransactionOperation representing the operation to update the list item.
UpdateListItemUtf8 双端
csharp
public static TransactionOperation UpdateListItemUtf8(long userId, long itemId, string value)Creates a transaction operation to update a list item with a UTF-8 string payload.
userId— 用户IDitemId— The globally unique identifier of the list item to update.value— UTF-8 字符串值。
返回: A TransactionOperation representing the operation to update the list item.
UpdateListItemDouble 双端
csharp
public static TransactionOperation UpdateListItemDouble(long userId, long itemId, double value)Creates a transaction operation to update a list item with a double payload.
userId— 用户IDitemId— The globally unique identifier of the list item to update.value— 双精度浮点值。
返回: A TransactionOperation representing the operation to update the list item.
SetVarChar255 双端
csharp
public static TransactionOperation SetVarChar255(long userId, string key, string value)创建设置字符串(VarChar255)操作
userId— 用户IDkey— 数据键value— 字符串值
返回: 事务操作
DeleteVarChar255 双端
csharp
public static TransactionOperation DeleteVarChar255(long userId, string key)创建删除字符串(VarChar255)操作
userId— 用户IDkey— 数据键
返回: 事务操作
SetBigInt 双端
csharp
public static TransactionOperation SetBigInt(long userId, string key, long value)创建设置整数(BigInt)操作
AddBigInt 双端
csharp
public static TransactionOperation AddBigInt(long userId, string key, long delta)创建增加整数(BigInt)操作
userId— 用户IDkey— 数据键delta— 增加的数值
返回: 事务操作
DeleteBigInt 双端
csharp
public static TransactionOperation DeleteBigInt(long userId, string key)创建删除整数(BigInt)操作
userId— 用户IDkey— 数据键
返回: 事务操作
AddCurrency 双端
csharp
public static TransactionOperation AddCurrency(long userId, string key, long amount)创建货币增加操作
userId— 用户IDkey— 货币键amount— 增加的金额
返回: 事务操作
CostCurrency 双端
csharp
public static TransactionOperation CostCurrency(long userId, string key, long amount)创建货币消耗操作,货币无法被消耗到负数,否则会使事物执行失败。
userId— 用户IDkey— 货币键amount— 消耗的金额
返回: 事务操作
ListItemAdd 双端
csharp
public static TransactionOperation ListItemAdd(long userId, string key, long itemId, byte[] data)创建添加列表项操作
userId— 用户IDkey— 列表键itemId— 列表项IDdata— 列表项数据
返回: 事务操作
ListItemAddUtf8 双端
csharp
public static TransactionOperation ListItemAddUtf8(long userId, string key, long itemId, string value)创建添加 UTF-8 字符串列表项操作。
userId— 用户IDkey— 列表键itemId— 列表项IDvalue— UTF-8 字符串值
返回: 事务操作
ListItemAddDouble 双端
csharp
public static TransactionOperation ListItemAddDouble(long userId, string key, long itemId, double value)创建添加双精度浮点列表项操作。
userId— 用户IDkey— 列表键itemId— 列表项IDvalue— 双精度浮点值
返回: 事务操作
DeleteListItem 双端
csharp
public static TransactionOperation DeleteListItem(long userId, long itemId)创建删除列表项操作
userId— 用户IDitemId— 全局唯一的列表项ID
返回: 事务操作
MoveListItem 双端
csharp
public static TransactionOperation MoveListItem(long userId, long itemId, string newListKey)创建移动列表项操作,将列表项从一个列表移动到另一个列表
userId— 用户IDitemId— 全局唯一的列表项IDnewListKey— 目标列表的键名
返回: 事务操作
ClaimNewName 双端
csharp
public static TransactionOperation ClaimNewName(string key, string newName, string description)创建新名称操作,名称无法被重复创建。用于实现玩家自定义名称的占用机制。 名称可以附带描述,描述为长度限制为255的UTF8字符串。名称不隶属于任何用户,它们的 key 是全局的。 已占用的名称可以通过 DeleteName 操作进行删除。
key— 名称键newName— 名称,长度限制为180description— 附加数据,长度限制为255
返回: 事务操作
DeleteName 双端
csharp
public static TransactionOperation DeleteName(string key, string name)创建删除已声明名称操作
key— 名称类别键name— 要删除的名称
返回: 事务操作
ModifyCapped 双端
csharp
public static TransactionOperation ModifyCapped(long userId, string key, long delta, long newCap, UserDataResetOption? resetOption)ResetCapped 双端
csharp
public static TransactionOperation ResetCapped(long userId, string key)重置有上限的数据,将当前值重置为0。
userId— 用户IDkey— 数据键
返回: 事务操作
UnitLocomotionAnimationClipPayload 双端
命名空间 EngineInterface.BaseType
csharp
public sealed class UnitLocomotionAnimationClipPayload构造函数
UnitLocomotionAnimationClipPayload 双端
csharp
public UnitLocomotionAnimationClipPayload()属性
Animation 双端
csharp
public UTF8String Animation { get; set; }LogicLayer 双端
csharp
public AnimationLogicLayer LogicLayer { get; set; }Priority 双端
csharp
public int Priority { get; set; }动画优先级,有效范围为 0-31。低于 0 的值会按 0 处理,高于 31 的值会按 31 处理。
BodyPart 双端
csharp
public AnimationBodyPart BodyPart { get; set; }IsLooping 双端
csharp
public bool IsLooping { get; set; }BlendIn 双端
csharp
public TimeSpan BlendIn { get; set; }Speed 双端
csharp
public float Speed { get; set; }UnitLocomotionAnimationProfilePayload 双端
命名空间 EngineInterface.BaseType
csharp
public sealed class UnitLocomotionAnimationProfilePayload构造函数
UnitLocomotionAnimationProfilePayload 双端
csharp
public UnitLocomotionAnimationProfilePayload()属性
LayoutVersion 双端
csharp
public int LayoutVersion { get; set; }Idle 双端
csharp
public UnitLocomotionAnimationClipPayload? Idle { get; set; }Move 双端
csharp
public UnitLocomotionAnimationClipPayload? Move { get; set; }JumpStart 双端
csharp
public UnitLocomotionAnimationClipPayload? JumpStart { get; set; }AirJumpStart 双端
csharp
public UnitLocomotionAnimationClipPayload? AirJumpStart { get; set; }AirRise 双端
csharp
public UnitLocomotionAnimationClipPayload? AirRise { get; set; }AirFall 双端
csharp
public UnitLocomotionAnimationClipPayload? AirFall { get; set; }Land 双端
csharp
public UnitLocomotionAnimationClipPayload? Land { get; set; }EnterMoveSpeed 双端
csharp
public float EnterMoveSpeed { get; set; }ExitMoveSpeed 双端
csharp
public float ExitMoveSpeed { get; set; }FallSpeedThreshold 双端
csharp
public float FallSpeedThreshold { get; set; }MinAirTimeForLand 双端
csharp
public TimeSpan MinAirTimeForLand { get; set; }LandSpeedThreshold 双端
csharp
public float LandSpeedThreshold { get; set; }InterruptLandOnMove 双端
csharp
public bool InterruptLandOnMove { get; set; }MinLandTimeForMoveInterrupt 双端
csharp
public TimeSpan MinLandTimeForMoveInterrupt { get; set; }LandMoveInterruptSpeed 双端
csharp
public float LandMoveInterruptSpeed { get; set; }MoveSpeedScaleMode 双端
csharp
public UnitLocomotionAnimationSpeedScaleMode MoveSpeedScaleMode { get; set; }MovementAnimationSpeedRatio 双端
csharp
public float MovementAnimationSpeedRatio { get; set; }字段
CurrentLayoutVersion 双端
csharp
public const int CurrentLayoutVersionUnitLocomotionAnimationSpeedScaleMode 双端
命名空间 EngineInterface.BaseType
csharp
public enum UnitLocomotionAnimationSpeedScaleMode枚举值
FixedHorizontalSpeed
UserDataResetOption 双端
命名空间 EngineInterface.BaseType
csharp
public record UserDataResetOption构造函数
UserDataResetOption 双端
csharp
protected UserDataResetOption(UserDataResetOption original)UserDataResetOption 双端
csharp
public UserDataResetOption()属性
EqualityContract 双端
csharp
protected virtual Type EqualityContract { get; }Interval 双端
csharp
public int Interval { get; init; }ResetPeriod 双端
csharp
public UserDataResetPeriod ResetPeriod { get; init; }ResetDayOfWeek 双端
csharp
public DayOfWeek ResetDayOfWeek { get; init; }IsWeekly 双端
csharp
public bool IsWeekly { get; }Returns true if the reset option is for weekly resets.
IsValid 双端
csharp
public bool IsValid { get; }Checks if the current option is valid.
Never 双端
csharp
public static UserDataResetOption Never { get; }获取一个永不重置的选项。
方法
ToString 双端
csharp
public override string ToString()Returns a friendly string representation of the reset option.
GetNextResetTime 双端
csharp
public DateTime GetNextResetTime(DateTime fromTime)Calculates the next reset time based on the current time.
Hourly 双端
csharp
public static UserDataResetOption Hourly(int interval = 1)创建一个每X小时重置一次的选项。重置时机基于第一次设置值的时间对齐到下一个整点,并以 interval 为步长递增。 例如:interval=2,第一次设置在3:59,则下次重置为5:00、7:00、9:00等。
interval— 重置的小时间隔,必须大于0。
备注
注意:如果更改重置周期类型(如从Hourly改为Weekly),则以更改时刻为新的基准点重新计算重置时间。
Daily 双端
csharp
public static UserDataResetOption Daily(int interval = 1)创建一个每X天重置一次的选项。重置时机为每天的0点(本地时间),首次重置点基于第一次设置值的日期对齐。 例如:interval=3,第一次设置在1号,则重置点为4号、7号等0点。
interval— 重置的天数间隔,必须大于0。
备注
注意:如果更改重置周期类型,则以更改时刻为新的基准点重新计算重置时间。
Weekly 双端
csharp
public static UserDataResetOption Weekly(int interval = 1, DayOfWeek dayOfWeek = DayOfWeek.Monday)创建一个每X周的指定周几重置的选项。重置时机为该天的0点(本地时间),首次重置点基于第一次设置值的周对齐。 例如:interval=2, dayOfWeek=Monday,第一次设置在某周三,则下一个重置为下下周一0点。
interval— 重置的周数间隔,必须大于0。dayOfWeek— 指定的周几(如Monday)。
备注
注意:如果更改重置周期类型,则以更改时刻为新的基准点重新计算重置时间。
Monthly 双端
csharp
public static UserDataResetOption Monthly(int interval = 1)创建一个每X月重置一次的选项。重置时机为每月的1号0点(本地时间),首次重置点基于第一次设置值的月份对齐。 例如:interval=2,第一次设置在1月,则重置点为3月1日、5月1日等0点。
interval— 重置的月数间隔,必须大于0。
备注
注意:如果更改重置周期类型,则以更改时刻为新的基准点重新计算重置时间。
Yearly 双端
csharp
public static UserDataResetOption Yearly(int interval = 1)创建一个每X年重置一次的选项。重置时机为每年的1月1日0点(本地时间),首次重置点基于第一次设置值的年份对齐。 例如:interval=3,第一次设置在2024年,则重置点为2027/1/1、2030/1/1等0点。
interval— 重置的年数间隔,必须大于0。
备注
注意:如果更改重置周期类型,则以更改时刻为新的基准点重新计算重置时间。
PrintMembers 双端
csharp
protected virtual bool PrintMembers(StringBuilder builder)GetHashCode 双端
csharp
public override int GetHashCode()Equals 双端
csharp
public virtual bool Equals(UserDataResetOption? other)VarChar180 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct VarChar180Represents a UTF8 string value with a maximum length of 180. It mimics the behavior of a VARCHAR(180) in SQL databases.
备注
This struct is designed to enforce a maximum length constraint of 180 for string values. It is commonly used in scenarios where database or API fields require such a restriction. Empty or whitespace-only strings are not allowed.
构造函数
VarChar180 双端
csharp
public VarChar180(string value)VarChar180 双端
csharp
public VarChar180(ReadOnlySpan<byte> span)VarChar180 双端
csharp
public VarChar180(ReadOnlySpan<char> unicodeCharSpan)VarChar180 双端
csharp
public VarChar180(UTF8String uTF8String)属性
IsNullOrEmpty 双端
csharp
public bool IsNullOrEmpty { get; }方法
implicit operator 双端
csharp
public static VarChar180 implicit operator(string value)implicit operator 双端
csharp
public static VarChar180 implicit operator(ReadOnlySpan<byte> span)implicit operator 双端
csharp
public static VarChar180 implicit operator(ReadOnlySpan<char> unicodeCharSpan)implicit operator 双端
csharp
public static VarChar180 implicit operator(UTF8String uTF8String)implicit operator 双端
csharp
public static UTF8String implicit operator(VarChar180 varChar)ToString 双端
csharp
public override string? ToString()字段
Bytes 双端
csharp
public readonly byte[]? BytesMaxLength 双端
csharp
public const int MaxLengthVarChar255 双端
命名空间 EngineInterface.BaseType
csharp
public readonly struct VarChar255Represents a UTF8 string value with a maximum length of 255 characters. It mimics the behavior of a VARCHAR(255) in SQL databases.
备注
This struct is designed to enforce a maximum length constraint of 255 characters for string values. It is commonly used in scenarios where database or API fields require such a restriction.
构造函数
VarChar255 双端
csharp
public VarChar255(string value)VarChar255 双端
csharp
public VarChar255(ReadOnlySpan<byte> span)VarChar255 双端
csharp
public VarChar255(ReadOnlySpan<char> unicodeCharSpan)VarChar255 双端
csharp
public VarChar255(UTF8String uTF8String)属性
IsNullOrEmpty 双端
csharp
public bool IsNullOrEmpty { get; }方法
implicit operator 双端
csharp
public static VarChar255 implicit operator(string value)implicit operator 双端
csharp
public static VarChar255 implicit operator(ReadOnlySpan<byte> span)implicit operator 双端
csharp
public static VarChar255 implicit operator(ReadOnlySpan<char> unicodeCharSpan)implicit operator 双端
csharp
public static VarChar255 implicit operator(UTF8String uTF8String)implicit operator 双端
csharp
public static UTF8String implicit operator(VarChar255 varChar)ToString 双端
csharp
public override string? ToString()字段
Bytes 双端
csharp
public readonly byte[]? BytesMaxLength 双端
csharp
public const int MaxLength