Compare commits
4 Commits
main
...
ded049b61b
| Author | SHA1 | Date | |
|---|---|---|---|
| ded049b61b | |||
| 48216b72f7 | |||
| 229461c83f | |||
| d671e4d311 |
@@ -58,14 +58,3 @@ const GRID_SNAP_REQUESTED = "grid_snap_requested"
|
||||
# 测试事件
|
||||
# ============================================================================
|
||||
const TEST_EVENT = "test_event"
|
||||
|
||||
# ============================================================================
|
||||
# 聊天事件
|
||||
# ============================================================================
|
||||
const CHAT_MESSAGE_SENT = "chat_message_sent"
|
||||
const CHAT_MESSAGE_RECEIVED = "chat_message_received"
|
||||
const CHAT_ERROR_OCCURRED = "chat_error_occurred"
|
||||
const CHAT_CONNECTION_STATE_CHANGED = "chat_connection_state_changed"
|
||||
const CHAT_POSITION_UPDATED = "chat_position_updated"
|
||||
const CHAT_LOGIN_SUCCESS = "chat_login_success"
|
||||
const CHAT_LOGIN_FAILED = "chat_login_failed"
|
||||
@@ -102,9 +102,10 @@ var _game_token: String = "" # @deprecated 使用 _access_token 替代
|
||||
# 初始化管理器
|
||||
func _init() -> void:
|
||||
_load_auth_data()
|
||||
print("AuthManager 初始化完成")
|
||||
|
||||
# 清理资源
|
||||
func cleanup() -> void:
|
||||
func cleanup():
|
||||
# 取消所有活动的网络请求
|
||||
for request_id in active_request_ids:
|
||||
NetworkManager.cancel_request(request_id)
|
||||
@@ -265,6 +266,7 @@ func get_refresh_token() -> String:
|
||||
func get_user_info() -> Dictionary:
|
||||
return _user_info
|
||||
|
||||
|
||||
# ============ 登录相关方法 ============
|
||||
|
||||
# 执行密码登录
|
||||
@@ -593,7 +595,7 @@ func validate_verification_code(code: String) -> Dictionary:
|
||||
# ============ 网络响应处理 ============
|
||||
|
||||
# 处理登录响应
|
||||
func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary) -> void:
|
||||
func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary):
|
||||
_reset_login_state()
|
||||
|
||||
var result = ResponseHandler.handle_login_response(success, data, error_info)
|
||||
@@ -602,11 +604,9 @@ func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary)
|
||||
show_toast_message.emit(result.message, result.success)
|
||||
|
||||
if result.success:
|
||||
# 保存 Token 到内存和本地
|
||||
_save_tokens_to_memory(data)
|
||||
_save_tokens_to_local(data)
|
||||
|
||||
var username: String = _user_info.get("username", "")
|
||||
var username = ""
|
||||
if data.has("data") and data.data.has("user") and data.data.user.has("username"):
|
||||
username = data.data.user.username
|
||||
|
||||
# 延迟发送登录成功信号
|
||||
await Engine.get_main_loop().create_timer(1.0).timeout
|
||||
@@ -615,7 +615,7 @@ func _on_login_response(success: bool, data: Dictionary, error_info: Dictionary)
|
||||
login_failed.emit(result.message)
|
||||
|
||||
# 处理验证码登录响应
|
||||
func _on_verification_login_response(success: bool, data: Dictionary, error_info: Dictionary) -> void:
|
||||
func _on_verification_login_response(success: bool, data: Dictionary, error_info: Dictionary):
|
||||
_reset_login_state()
|
||||
|
||||
var result = ResponseHandler.handle_verification_code_login_response(success, data, error_info)
|
||||
@@ -624,11 +624,9 @@ func _on_verification_login_response(success: bool, data: Dictionary, error_info
|
||||
show_toast_message.emit(result.message, result.success)
|
||||
|
||||
if result.success:
|
||||
# 保存 Token 到内存和本地
|
||||
_save_tokens_to_memory(data)
|
||||
_save_tokens_to_local(data)
|
||||
|
||||
var username: String = _user_info.get("username", "")
|
||||
var username = ""
|
||||
if data.has("data") and data.data.has("user") and data.data.user.has("username"):
|
||||
username = data.data.user.username
|
||||
|
||||
await Engine.get_main_loop().create_timer(1.0).timeout
|
||||
login_success.emit(username)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://b6lnbss2i3pss
|
||||
@@ -1 +0,0 @@
|
||||
uid://dmbgtbf6gyk6t
|
||||
@@ -1,19 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://c5ujr1fj14n58"
|
||||
path="res://.godot/imported/Spawn Fixed.mp3-cdebcc11ab16736c9b4a0906adccb431.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/music/Spawn Fixed.mp3"
|
||||
dest_files=["res://.godot/imported/Spawn Fixed.mp3-cdebcc11ab16736c9b4a0906adccb431.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
|
Before Width: | Height: | Size: 1000 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c8on1etsscvcg"
|
||||
path="res://.godot/imported/Image (1).png-aa55b4ad122083e1e56d7de11ec05750.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/Image (1).png"
|
||||
dest_files=["res://.godot/imported/Image (1).png-aa55b4ad122083e1e56d7de11ec05750.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 1.0 MiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dh07ed5tsiyhp"
|
||||
path="res://.godot/imported/Image (2).png-d93edf5c7f9059af2b89d1fb72733335.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/Image (2).png"
|
||||
dest_files=["res://.godot/imported/Image (2).png-d93edf5c7f9059af2b89d1fb72733335.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 902 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://kvgofnnxp31q"
|
||||
path="res://.godot/imported/Image (3).png-0fd2a2989e780fcbaf4376bb6e288f40.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/Image (3).png"
|
||||
dest_files=["res://.godot/imported/Image (3).png-0fd2a2989e780fcbaf4376bb6e288f40.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 992 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://0pt270gaevbk"
|
||||
path="res://.godot/imported/微信图片_20251218232924_983_1425.png-0163d5f3fcf9765f1d8d0ec22851e7b0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/微信图片_20251218232924_983_1425.png"
|
||||
dest_files=["res://.godot/imported/微信图片_20251218232924_983_1425.png-0163d5f3fcf9765f1d8d0ec22851e7b0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 690 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b6wlro1vixo8a"
|
||||
path="res://.godot/imported/清空内部组件的登录框架 (1).png-4be35396d0272fde2f195d02324c3439.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/清空内部组件的登录框架 (1).png"
|
||||
dest_files=["res://.godot/imported/清空内部组件的登录框架 (1).png-4be35396d0272fde2f195d02324c3439.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 206 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dyma4hpodhdxi"
|
||||
path="res://.godot/imported/登录背景.png-89ec90e6b5b2b96eba5cf8e1b1d50ed8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/登录背景.png"
|
||||
dest_files=["res://.godot/imported/登录背景.png-89ec90e6b5b2b96eba5cf8e1b1d50ed8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 104 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cnrffaqbtw8f5"
|
||||
path="res://.godot/imported/输入框.png-74076fbd98c6a5dee8485c2e25f4d583.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/auth/输入框.png"
|
||||
dest_files=["res://.godot/imported/输入框.png-74076fbd98c6a5dee8485c2e25f4d583.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 198 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cchjgp6qh7u61"
|
||||
path="res://.godot/imported/缩略框背景.png-1ffcbaafc0bc1c1b17eae2ad5370d0bc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/chat/缩略框背景.png"
|
||||
dest_files=["res://.godot/imported/缩略框背景.png-1ffcbaafc0bc1c1b17eae2ad5370d0bc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 276 B |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ct0cl4h2i6ydn"
|
||||
path="res://.godot/imported/装饰.png-ee12c19262540c6b6c0fc47732c88ff9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/chat/装饰.png"
|
||||
dest_files=["res://.godot/imported/装饰.png-ee12c19262540c6b6c0fc47732c88ff9.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 281 B |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://q0ijn5y0tbw3"
|
||||
path="res://.godot/imported/装饰2.png-d3c5ac2817d592f843ba8179eb83dd5b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/chat/装饰2.png"
|
||||
dest_files=["res://.godot/imported/装饰2.png-d3c5ac2817d592f843ba8179eb83dd5b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -1,40 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://clmgyxpeh5742"
|
||||
path="res://.godot/imported/输入框背景.png-0abeb0259c1b08c235f188bb6bf412c1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ui/chat/输入框背景.png"
|
||||
dest_files=["res://.godot/imported/输入框背景.png-0abeb0259c1b08c235f188bb6bf412c1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
13
claude.md
@@ -159,16 +159,3 @@ func _move(_delta: float) -> void:
|
||||
var dir := Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
velocity = dir * move_speed
|
||||
move_and_slide()
|
||||
```
|
||||
## 10. 🔄 Plan Mode Protocol (MANDATORY)
|
||||
- **Planning Phase**:
|
||||
- Whenever using **Plan Mode** to outline a task, a TODO list MUST be outputted to `docs/ai_docs/plan/[feature_name].md`.
|
||||
- **Execution & Reporting**:
|
||||
- Every time a TODO item is completed, the corresponding `.md` document MUST be updated.
|
||||
- After updating the document, report to the user with the following:
|
||||
1. **Completed Items**: What was just finished.
|
||||
2. **User Acceptance Rules**: Instructions on how the user can test/verify the current progress.
|
||||
3. **Next Step**: The next TODO item to be tackled.
|
||||
- **Strict Confirmation**:
|
||||
- After reporting progress, **Claude MUST stop and wait**.
|
||||
- Do NOT proceed to the next TODO until the user has replied with confirmation/approval.
|
||||
@@ -22,8 +22,11 @@ SceneManager="*res://_Core/managers/SceneManager.gd"
|
||||
EventSystem="*res://_Core/systems/EventSystem.gd"
|
||||
NetworkManager="*res://_Core/managers/NetworkManager.gd"
|
||||
ResponseHandler="*res://_Core/managers/ResponseHandler.gd"
|
||||
<<<<<<< HEAD
|
||||
ChatManager="*res://_Core/managers/ChatManager.gd"
|
||||
LocationManager="*res://_Core/managers/LocationManager.gd"
|
||||
=======
|
||||
>>>>>>> main
|
||||
|
||||
[debug]
|
||||
|
||||
@@ -31,8 +34,13 @@ gdscript/warnings/treat_warnings_as_errors=false
|
||||
|
||||
[display]
|
||||
|
||||
<<<<<<< HEAD
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1440
|
||||
=======
|
||||
window/size/viewport_width=1376
|
||||
window/size/viewport_height=768
|
||||
>>>>>>> main
|
||||
window/size/mode=2
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
@@ -14,7 +14,6 @@ extends Control
|
||||
# 场景节点引用
|
||||
@onready var auth_scene: Control = $AuthScene
|
||||
@onready var main_game_ui: Control = $MainGameUI
|
||||
@onready var chat_ui: Control = %ChatUI
|
||||
@onready var user_label: Label = $MainGameUI/TopBar/HBoxContainer/UserLabel
|
||||
@onready var logout_button: Button = $MainGameUI/TopBar/HBoxContainer/LogoutButton
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cjabtnqbdd2ey"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cjabtnqbdd2ey"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ghehm4srs0ho" path="res://scenes/MainScene.gd" id="1_script"]
|
||||
[ext_resource type="Script" path="res://scenes/MainScene.gd" id="1_script"]
|
||||
[ext_resource type="PackedScene" uid="uid://by7m8snb4xllf" path="res://scenes/ui/AuthScene.tscn" id="2_main"]
|
||||
[ext_resource type="PackedScene" uid="uid://bv7k2nan4xj8q" path="res://scenes/ui/ChatUI.tscn" id="3_chat_ui"]
|
||||
|
||||
[node name="Main" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_script")
|
||||
|
||||
[node name="AuthScene" parent="." instance=ExtResource("2_main")]
|
||||
@@ -22,15 +19,12 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="TopBar" type="Panel" parent="MainGameUI"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 60.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MainGameUI/TopBar"]
|
||||
layout_mode = 1
|
||||
@@ -41,8 +35,6 @@ offset_left = 20.0
|
||||
offset_top = 10.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = -10.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="UserLabel" type="Label" parent="MainGameUI/TopBar/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
@@ -60,23 +52,19 @@ anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = 60.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="MainGameUI/MainContent"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MainGameUI/MainContent/CenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="StatusPanel" type="Panel" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(400, 150)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(400, 150)
|
||||
|
||||
[node name="StatusContainer" type="MarginContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel"]
|
||||
layout_mode = 1
|
||||
@@ -87,8 +75,6 @@ offset_left = 20.0
|
||||
offset_top = 20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = -20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="StatusGrid" type="GridContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer"]
|
||||
layout_mode = 2
|
||||
@@ -115,24 +101,21 @@ layout_mode = 2
|
||||
columns = 2
|
||||
|
||||
[node name="ExploreButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
text = "🗺️ 探索小镇"
|
||||
|
||||
[node name="InventoryButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
text = "🎒 背包"
|
||||
|
||||
[node name="ShopButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
text = "🏪 商店"
|
||||
|
||||
[node name="FriendsButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(150, 50)
|
||||
text = "👥 好友"
|
||||
|
||||
[node name="ChatUI" parent="MainGameUI" instance=ExtResource("3_chat_ui")]
|
||||
layout_mode = 1
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://b7bgtip4yxeg8
|
||||
@@ -1 +0,0 @@
|
||||
uid://djqrgj3h0lif7
|
||||
@@ -1,14 +1,10 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://by7m8snb4xllf"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://by7m8snb4xllf"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bx17oy8lvaca4" path="res://assets/ui/auth/bg_auth_scene.png" id="1_background"]
|
||||
[ext_resource type="Script" uid="uid://b514h2wuido0h" path="res://scenes/ui/AuthScene.gd" id="3_script"]
|
||||
[ext_resource type="Texture2D" uid="uid://dyma4hpodhdxi" path="res://assets/ui/auth/登录背景.png" id="3_wh4n4"]
|
||||
[ext_resource type="Texture2D" uid="uid://cnrffaqbtw8f5" path="res://assets/ui/auth/输入框.png" id="4_lnw07"]
|
||||
[ext_resource type="Texture2D" uid="uid://de4q4s1gxivtf" path="res://assets/ui/auth/login_frame_smart_transparent.png" id="2_frame"]
|
||||
[ext_resource type="Script" path="res://scenes/ui/AuthScene.gd" id="3_script"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_26vyf"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_cjyup"]
|
||||
texture = ExtResource("4_lnw07")
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hover"]
|
||||
bg_color = Color(0.3, 0.6, 0.9, 1)
|
||||
@@ -63,8 +59,6 @@ Button/styles/hover = SubResource("StyleBoxFlat_hover")
|
||||
Button/styles/normal = SubResource("StyleBoxFlat_normal")
|
||||
Button/styles/pressed = SubResource("StyleBoxFlat_pressed")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1"]
|
||||
|
||||
[node name="AuthScene" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
@@ -87,14 +81,22 @@ texture = ExtResource("1_background")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
modulate = Color(0.84313726, 0.92941177, 0.98039216, 0.47058824)
|
||||
[node name="WhaleFrame" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = -300.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 300.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_frame")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -110,45 +112,35 @@ offset_bottom = 236.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="WhaleFrame" type="TextureRect" parent="CenterContainer"]
|
||||
custom_minimum_size = Vector2(500, 0)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_wh4n4")
|
||||
expand_mode = 4
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="LoginPanel" type="Panel" parent="CenterContainer"]
|
||||
custom_minimum_size = Vector2(300, 0)
|
||||
custom_minimum_size = Vector2(350, 400)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_26vyf")
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_1")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/LoginPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -140.0
|
||||
offset_top = -185.5
|
||||
offset_right = 140.0
|
||||
offset_bottom = 185.5
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 30.0
|
||||
offset_top = 30.0
|
||||
offset_right = -30.0
|
||||
offset_bottom = -30.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="CenterContainer/LoginPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0.011764706, 0.12156863, 0.101960786, 0)
|
||||
theme_override_font_sizes/font_size = 32
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Whaletown"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="SubtitleLabel" type="Label" parent="CenterContainer/LoginPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.53333336, 0.53333336, 0.53333336, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "开始你的小镇之旅!"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -188,13 +180,10 @@ theme_override_font_sizes/font_size = 12
|
||||
text = "用户名不能为空"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="UsernameInput" type="LineEdit" parent="CenterContainer/LoginPanel/VBoxContainer/LoginForm"]
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
[node name="UsernameInput" type="LineEdit" parent="CenterContainer/LoginPanel/VBoxContainer/LoginForm/UsernameContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_colors/font_placeholder_color = Color(0.5, 0.5, 0.5, 1)
|
||||
theme_override_colors/selection_color = Color(0.5, 0.5, 0.5, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxTexture_cjyup")
|
||||
placeholder_text = "用户名/手机/邮箱"
|
||||
|
||||
[node name="PasswordContainer" type="VBoxContainer" parent="CenterContainer/LoginPanel/VBoxContainer/LoginForm"]
|
||||
@@ -563,8 +552,6 @@ theme = SubResource("Theme_button")
|
||||
text = "返回登录"
|
||||
|
||||
[node name="ToastContainer" type="Control" parent="."]
|
||||
modulate = Color(0.84313726, 0.92941177, 0.98039216, 1)
|
||||
self_modulate = Color(0.84313726, 0.92941177, 0.9843137, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
uid://pibdlvhb12q8
|
||||
@@ -1 +0,0 @@
|
||||
uid://dgmrscyt2lsnt
|
||||