summaryrefslogtreecommitdiff
path: root/character_information.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-11-28 18:38:42 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-11-28 18:38:42 +0100
commite8aa9f50886b66d525307a58d71036e6fd3d4aa1 (patch)
treece6f59eecf1eb3e1ba2794166c09623d8a2d7d83 /character_information.gd
parentc89f25f59aa493d95bcac8e75ca5cdd57a0403e7 (diff)
next commit
Diffstat (limited to 'character_information.gd')
-rw-r--r--character_information.gd32
1 files changed, 0 insertions, 32 deletions
diff --git a/character_information.gd b/character_information.gd
deleted file mode 100644
index 101f74f..0000000
--- a/character_information.gd
+++ /dev/null
@@ -1,32 +0,0 @@
-class_name CharacterInformation
-
-
-## Byte Length: 4
-var character_id: int
-
-## Byte Length: 8
-var experience: int
-
-## Byte Length: 4
-var money: int
-
-
-static func from_bytes(bytes: PackedByteArray):
- var info = CharacterInformation.new()
-
- info.character_id = bytes.decode_u32(0)
- info.experience = bytes.decode_s64(4)
- info.money = bytes.decode_s32(12)
-
- return info
-
-
-static func array_from_bytes(bytes: PackedByteArray) -> Array:
- var array = []
-
- var offset = 0
- while offset < bytes.size():
- array.append(from_bytes(bytes.slice(offset)))
- offset += 175
-
- return array