提交测试代码

This commit is contained in:
Bob.Song
2026-03-06 12:15:56 +08:00
parent 209049354c
commit 7127857199
37 changed files with 1269 additions and 270 deletions

View File

@@ -0,0 +1,30 @@
// using Fantasy.Entitas;
// using Fantasy.Network;
// using Fantasy.Serialize;
//
// namespace NBF
// {
// public class SerializerComponent : Entity
// {
// public ISerialize Serialize;
// public readonly MemoryStreamBufferPool BufferPool = new MemoryStreamBufferPool();
//
//
// public void Initialize()
// {
// Serialize = SerializerManager.ProtoBufHelper;
// }
//
// public byte[] Serialize<T>(T @object)
// {
// using var memoryStreamBuffer = BufferPool.RentMemoryStream(MemoryStreamBufferSource.None);
// Serialize.Serialize(typeof(T), @object, memoryStreamBuffer);
// return memoryStreamBuffer.ToArray();
// }
//
// public T Deserialize<T>(byte[] bytes)
// {
// return Serialize.Deserialize<T>(bytes);
// }
// }
// }