mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
29 lines
498 B
C#
29 lines
498 B
C#
using FlatBuffers;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public struct MPSendPacketContainer
|
|
{
|
|
public uint runtimeID;
|
|
|
|
public int packetTypeID;
|
|
|
|
public FlatBufferBuilder builder;
|
|
|
|
public MPSendContainerState state;
|
|
|
|
public void Finish<T>(Offset<T> offset) where T : Table
|
|
{
|
|
builder.Finish(offset.Value);
|
|
state = MPSendContainerState.Finished;
|
|
}
|
|
|
|
public T ReadAs<T>() where T : Table, new()
|
|
{
|
|
T result = new T();
|
|
result.ResetAndInitTo(builder.DataBuffer);
|
|
return result;
|
|
}
|
|
}
|
|
}
|