Files
whale-town-front/docs/setup.md
moyin a05bac6f05 docs:添加完整的项目文档体系
- 添加Web部署完整指南和更新日志
- 创建网络管理器配置文档
- 完善项目设置和测试指南
- 添加API更新日志和清理总结
- 更新脚本使用说明文档
2025-12-25 23:09:59 +08:00

28 lines
697 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 项目设置指南
## AutoLoad 配置
在 Godot 编辑器中设置 NetworkManager 为全局单例:
1. 打开 `Project``Project Settings`
2. 切换到 `AutoLoad` 标签
3. 添加新的 AutoLoad
- **Path**: `res://core/managers/NetworkManager.gd`
- **Name**: `NetworkManager`
- **Singleton**: ✅ 勾选
## 验证设置
在任何脚本中可以直接使用:
```gdscript
func _ready():
var request_id = NetworkManager.login("username", "password", callback)
print("请求ID: ", request_id)
```
## 注意事项
- 确保 NetworkManager.gd 和 ResponseHandler.gd 文件存在
- 重启 Godot 编辑器以确保 AutoLoad 生效
- 检查控制台是否有错误信息