feat: 添加.editorconfig文件并调整调试模式设置
添加.editorconfig文件以统一代码风格配置 将GameMap.h中的debugMode_设为true并禁用movableAreaCheckEnabled_以方便调试 更新AGENTS.md文档,添加代理偏好设置说明
This commit is contained in:
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{c,cc,cpp,cxx,h,hh,hpp,hxx,ipp,ixx,lua}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
This guide helps agentic coding agents work effectively with the Frostbite2D 2D game engine codebase.
|
||||
|
||||
## Agent Preferences
|
||||
|
||||
- Communicate with the user in Chinese by default unless they explicitly ask for another language.
|
||||
- Treat UTF-8 as the default encoding for new or edited text and source files; do not introduce ANSI or GBK encoded files.
|
||||
|
||||
## Build Commands
|
||||
|
||||
### Basic Build
|
||||
@@ -206,4 +211,4 @@ if (asset.readTextFile("file.txt", content)) {
|
||||
- **Path separators**: Use Asset class, it handles platform differences
|
||||
- **Encoding**: Project uses UTF-8, Asset handles Windows UTF-8 paths
|
||||
- **Memory leaks**: Use smart pointers, ensure proper cleanup in destructors
|
||||
- **OpenGL context**: Initialize only after window creation
|
||||
- **OpenGL context**: Initialize only after window creation
|
||||
|
||||
@@ -93,9 +93,9 @@ private:
|
||||
int backgroundRepeatWidth_ = 0;
|
||||
/// 地图配置里的整体 Y 偏移;既影响层位置,也影响地板校准。
|
||||
int mapOffsetY_ = 0;
|
||||
bool debugMode_ = false;
|
||||
bool debugMode_ = true;
|
||||
/// 硬编码调试开关:关闭后忽略可行走区域检测,允许角色自由移动。
|
||||
bool movableAreaCheckEnabled_ = true;
|
||||
bool movableAreaCheckEnabled_ = false;
|
||||
/// 当前地图正在播放的背景音乐。
|
||||
Ptr<Music> currentMusic_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user