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

admin_stats_request()

void

authenticate(jwt_token: String)

void

battle_action(battle_id: String, action: BattleAction, target_id: String = "")

void

clear_debug_log()

bool

connect_to_server(address: String, port: int)

void

disconnect_from_server()

void

enter_region(region_id: String)

PackedStringArray

get_debug_log() const

String

get_last_error_message() const

String

get_last_info_message() const

String

get_last_warning_message() const

String

get_server_version() const

TownSdkClient

get_singleton() static

bool

is_client_connected() const

bool

is_debug_logging_enabled() const

void

leave_battle(battle_id: String)

void

leave_region()

void

manual_reconnect()

void

poll(delta: float)

void

send_move(held: int, delta: float)

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!


battle_log(log: String) ๐Ÿ”—

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!


error(message: String) ๐Ÿ”—

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!


void poll(delta: float) ๐Ÿ”—

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!