新增位移,数值相关组件

This commit is contained in:
2025-08-25 18:03:15 +08:00
parent e41fd7dd2d
commit a3768e4aa2
73 changed files with 1254 additions and 484 deletions

View File

@@ -68,6 +68,26 @@ namespace NBC
public long Value { get; set; }
}
[ProtoContract]
public partial class KeyValueInt32 : AMessage, IProto
{
public static KeyValueInt32 Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<KeyValueInt32>();
}
public override void Dispose()
{
Key = default;
Value = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<KeyValueInt32>(this);
#endif
}
[ProtoMember(1)]
public int Key { get; set; }
[ProtoMember(2)]
public int Value { get; set; }
}
[ProtoContract]
public partial class KeyValueInt64 : AMessage, IProto
{
public static KeyValueInt64 Create(Scene scene)