forked from moyin/whale-town-front
- 添加 SocketIOClient.gd 实现 Socket.IO 协议封装 - 添加 WebSocketManager.gd 管理连接生命周期和自动重连 - 添加 ChatManager.gd 实现聊天业务逻辑与会话管理 - 支持当前会话缓存(最多 100 条消息) - 支持历史消息按需加载(每次 100 条) - 每次登录/重连自动重置会话缓存 - 客户端频率限制(10 条/分钟) - Token 管理与认证 - 添加 ChatMessage.gd/tscn 消息气泡 UI 组件 - 添加 ChatUI.gd/tscn 聊天界面 - 在 EventNames.gd 添加 7 个聊天事件常量 - 在 AuthManager.gd 添加 game_token 管理方法 - 添加完整的单元测试(128 个测试用例) - test_socketio_client.gd (42 个测试) - test_websocket_manager.gd (38 个测试) - test_chat_manager.gd (48 个测试) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
92 lines
4.5 KiB
Plaintext
92 lines
4.5 KiB
Plaintext
; Engine configuration file.
|
|
; It's best edited using the editor UI and not directly,
|
|
; since the parameters that go here are not all obvious.
|
|
;
|
|
; Format:
|
|
; [section] ; section goes between []
|
|
; param=value ; assign values to parameters
|
|
|
|
config_version=5
|
|
|
|
[application]
|
|
|
|
config/name="whaleTown"
|
|
run/main_scene="res://scenes/MainScene.tscn"
|
|
config/features=PackedStringArray("4.5", "Forward Plus")
|
|
config/icon="res://icon.svg"
|
|
|
|
[autoload]
|
|
|
|
GameManager="*res://_Core/managers/GameManager.gd"
|
|
SceneManager="*res://_Core/managers/SceneManager.gd"
|
|
EventSystem="*res://_Core/systems/EventSystem.gd"
|
|
NetworkManager="*res://_Core/managers/NetworkManager.gd"
|
|
ResponseHandler="*res://_Core/managers/ResponseHandler.gd"
|
|
ChatManager="*res://_Core/managers/ChatManager.gd"
|
|
|
|
[debug]
|
|
|
|
gdscript/warnings/treat_warnings_as_errors=false
|
|
|
|
[display]
|
|
|
|
window/size/viewport_width=1376
|
|
window/size/viewport_height=768
|
|
window/size/mode=2
|
|
window/stretch/mode="canvas_items"
|
|
window/stretch/aspect="expand"
|
|
|
|
[gui]
|
|
|
|
theme/custom="uid://cp7t8tu7rmyad"
|
|
|
|
[input]
|
|
|
|
move_left={
|
|
"deadzone": 0.5,
|
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
|
]
|
|
}
|
|
move_right={
|
|
"deadzone": 0.5,
|
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
|
]
|
|
}
|
|
move_up={
|
|
"deadzone": 0.5,
|
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
|
]
|
|
}
|
|
move_down={
|
|
"deadzone": 0.5,
|
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
|
]
|
|
}
|
|
jump={
|
|
"deadzone": 0.5,
|
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
|
]
|
|
}
|
|
interact={
|
|
"deadzone": 0.5,
|
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
|
|
]
|
|
}
|
|
|
|
[internationalization]
|
|
|
|
locale/test="zh_CN"
|
|
|
|
[rendering]
|
|
|
|
renderer/rendering_method="gl_compatibility"
|
|
renderer/rendering_method.mobile="gl_compatibility"
|
|
textures/vram_compression/import_etc2_astc=true
|
|
fonts/dynamic_fonts/use_oversampling=true
|
|
debug/disable_vsync=false
|
|
debug/settings/stdout/print_fps=false
|