gdscript.ProtocolClassTemplate.gd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protocol Show documentation
Show all versions of protocol Show documentation
zfoo protocol is binary serialization framework for Java/C++/js/ts/C#/Go/Lua/GDScript/Python
The newest version!
${protocol_note}
class ${protocol_name}:
${protocol_field_definition}
func protocolId() -> int:
return ${protocol_id}
func get_class_name() -> String:
return "${protocol_name}"
func _to_string() -> String:
const jsonTemplate = "${protocol_json}"
var params = [${protocol_to_string}]
return jsonTemplate.format(params, "{}")