test[python]: test python serialization

This commit is contained in:
godotg
2023-08-27 10:13:08 +08:00
parent 20d73fe7e6
commit 6083a284cd
9 changed files with 16424 additions and 0 deletions
@@ -0,0 +1,24 @@
class ObjectB:
flag = False # bool
def protocolId(self):
return 103
@classmethod
def write(cls, buffer, packet):
if buffer.writePacketFlag(packet):
return
buffer.writeBool(packet.flag)
pass
@classmethod
def read(cls, buffer):
if not buffer.readBool():
return None
packet = ObjectB()
result0 = buffer.readBool()
packet.flag = result0
return packet