TownSdkClient๏
Inherits: Object
Client wrapper that connects the Blazium engine to a TownServer instance over ENet.
Description๏
TownSdkClient owns the low-level C++ SDK, exposes it to GDScript and GDNative, and emits signals for all incoming events from the server. The module instantiates a singleton automatically during engine startup, which can be retrieved through TownSdkClient.get_singleton() or Engine.get_singleton("TownSDK"). Call poll() once per frame (e.g. from _process()) to keep the client responsive.
Methods๏
void |
admin_broadcast(message: String, is_alert: bool = false) |
void |
admin_kick(username: String, reason: String = "") |
void |
admin_reload(scope: String) |
void |
|
void |
authenticate(jwt_token: String) |
void |
battle_action(battle_id: String, action: BattleAction, target_id: String = "") |
void |
|
connect_to_server(address: String, port: int) |
|
void |
|
void |
enter_region(region_id: String) |
get_debug_log() const |
|
get_last_error_message() const |
|
get_last_info_message() const |
|
get_last_warning_message() const |
|
get_server_version() const |
|
get_singleton() static |
|
is_client_connected() const |
|
is_debug_logging_enabled() const |
|
void |
leave_battle(battle_id: String) |
void |
|
void |
|
void |
|
void |
|
void |
set_auto_reconnect(enabled: bool) |
void |
set_debug_logging_enabled(enabled: bool, history_limit: int = 64) |
Signals๏
admin_broadcast_received(payload: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
admin_kick_received(payload: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
admin_reload_received(payload: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
admin_stats_received(payload: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
battle_end(battle: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
battle_indicator_despawn(indicator: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
battle_indicator_spawn(indicator: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
There is currently no description for this signal. Please help us by contributing one!
battle_start(battle: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
battle_state(state: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
connected() ๐
There is currently no description for this signal. Please help us by contributing one!
connection_failed() ๐
There is currently no description for this signal. Please help us by contributing one!
disconnected(reason: String) ๐
There is currently no description for this signal. Please help us by contributing one!
There is currently no description for this signal. Please help us by contributing one!
move_state(state: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
reconnect_failed(reason: String) ๐
There is currently no description for this signal. Please help us by contributing one!
reconnected(resume_state: Variant) ๐
There is currently no description for this signal. Please help us by contributing one!
reconnecting(attempt: int, next_delay: float) ๐
There is currently no description for this signal. Please help us by contributing one!
snapshot_received(snapshot: Dictionary) ๐
There is currently no description for this signal. Please help us by contributing one!
Enumerations๏
enum BattleAction: ๐
BattleAction ACTION_ATTACK = 0
There is currently no description for this enum. Please help us by contributing one!
BattleAction ACTION_BLOCK = 1
There is currently no description for this enum. Please help us by contributing one!
BattleAction ACTION_DEFEND = 2
There is currently no description for this enum. Please help us by contributing one!
Method Descriptions๏
void admin_broadcast(message: String, is_alert: bool = false) ๐
There is currently no description for this method. Please help us by contributing one!
void admin_kick(username: String, reason: String = "") ๐
There is currently no description for this method. Please help us by contributing one!
void admin_reload(scope: String) ๐
There is currently no description for this method. Please help us by contributing one!
void admin_stats_request() ๐
There is currently no description for this method. Please help us by contributing one!
void authenticate(jwt_token: String) ๐
There is currently no description for this method. Please help us by contributing one!
void battle_action(battle_id: String, action: BattleAction, target_id: String = "") ๐
There is currently no description for this method. Please help us by contributing one!
void clear_debug_log() ๐
There is currently no description for this method. Please help us by contributing one!
bool connect_to_server(address: String, port: int) ๐
There is currently no description for this method. Please help us by contributing one!
void disconnect_from_server() ๐
There is currently no description for this method. Please help us by contributing one!
void enter_region(region_id: String) ๐
There is currently no description for this method. Please help us by contributing one!
PackedStringArray get_debug_log() const ๐
There is currently no description for this method. Please help us by contributing one!
String get_last_error_message() const ๐
There is currently no description for this method. Please help us by contributing one!
String get_last_info_message() const ๐
There is currently no description for this method. Please help us by contributing one!
String get_last_warning_message() const ๐
There is currently no description for this method. Please help us by contributing one!
String get_server_version() const ๐
There is currently no description for this method. Please help us by contributing one!
TownSdkClient get_singleton() static ๐
There is currently no description for this method. Please help us by contributing one!
bool is_client_connected() const ๐
There is currently no description for this method. Please help us by contributing one!
bool is_debug_logging_enabled() const ๐
There is currently no description for this method. Please help us by contributing one!
void leave_battle(battle_id: String) ๐
There is currently no description for this method. Please help us by contributing one!
void leave_region() ๐
There is currently no description for this method. Please help us by contributing one!
void manual_reconnect() ๐
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
void send_move(held: int, delta: float) ๐
There is currently no description for this method. Please help us by contributing one!
void set_auto_reconnect(enabled: bool) ๐
There is currently no description for this method. Please help us by contributing one!
void set_debug_logging_enabled(enabled: bool, history_limit: int = 64) ๐
There is currently no description for this method. Please help us by contributing one!