From d560f77811d4fc6f29bf477356a6d2e58dda0be1 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 30 Nov 2024 12:46:08 +0100 Subject: next commit --- packets/packet.gd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'packets/packet.gd') diff --git a/packets/packet.gd b/packets/packet.gd index 33db0b1..b1e72ed 100644 --- a/packets/packet.gd +++ b/packets/packet.gd @@ -1,14 +1,16 @@ class_name Packet -#static var header: int = 0 +# set to 0 if variable length +#const BYTE_LENGTH := 0 -var byte_length: int = 0 +var byte_length: int = 0: + get = get_byte_length -## Override if packet has variable length +## Override if packet has variable length. func get_byte_length() -> int: - return byte_length + return self.BYTE_LENGTH ## Get header to prepend to the packet. [br] -- cgit v1.2.3