fix: 修复聊天系统编译错误

- 修复 WebSocketManager/SocketIOClient 函数缩进错误
- 重命名 is_connected() 避免与 Object 基类冲突
- 修复 tscn 文件多余前导空格
- 修复测试文件 GUT 断言函数调用
- 添加 GUT 测试框架
This commit is contained in:
WhaleTown Developer
2026-01-08 00:11:12 +08:00
parent 16f24ab26f
commit c8e73bec59
255 changed files with 21876 additions and 91 deletions

View File

@@ -144,8 +144,8 @@ func connect_to_game_server() -> void:
_socket_client.connect_to_server(WEBSOCKET_URL)
# 断开连接
func disconnect() -> void:
# 断开 WebSocket 连接
func disconnect_websocket() -> void:
print("=== WebSocketManager 断开连接 ===")
_clean_close = true
@@ -156,11 +156,11 @@ func disconnect() -> void:
_socket_client.disconnect_from_server()
_set_connection_state(ConnectionState.DISCONNECTED)
# 检查是否已连接
# 检查 WebSocket 是否已连接
#
# 返回值:
# bool - 是否已连接
func is_connected() -> bool:
# bool - WebSocket 是否已连接
func is_websocket_connected() -> bool:
return _connection_state == ConnectionState.CONNECTED
# 获取当前连接状态