godot-start/gdProtocol/packet/ObjectB.gd

21 lines
381 B
GDScript
Raw Normal View History

2021-10-18 07:20:14 +00:00
# @author jaysunxiao
# @version 3.0
2022-05-18 13:08:42 +00:00
2021-10-18 07:20:14 +00:00
var flag # boolean
const PROTOCOL_ID = 103
static func write(buffer, packet):
if (buffer.writePacketFlag(packet)):
return
buffer.writeBool(packet.flag)
static func read(buffer):
if (!buffer.readBool()):
return null
2022-05-18 13:08:42 +00:00
var packet = buffer.newInstance(PROTOCOL_ID)
2021-10-18 07:20:14 +00:00
var result0 = buffer.readBool()
packet.flag = result0
return packet