[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FBKM2EQ21GMB51MYN3VDFK":3,"skill-same:01M7FBKM2EQ21GMB51MYN3VDFK":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7FBKM2EQ21GMB51MYN3VDFK","godot-2d",null,"写 Godot 4 的 2D 场景时用。CharacterBody2D 角色移动与平台跳跃、碰撞层、Area2D、TileMapLayer 瓦片地图与地形自动接边、Camera2D 跟随 平滑 limit 震屏、Parallax2D、y_sort 绘制顺序、像素风缩放、2D 光照、寻路、射线与物理查询、_draw 自绘。也用于查某个 2D 需求有没有内置节点。3D 里放 2D 角色见 godot-2d-in-3d。","MindsMaster\u002Fgodot-claude-code-skills","MindsMaster","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F167383411?v=4","01M7FBJFZBSAXET9TF9WDFRCJW","An5w1r","01M7FBJFZZRARX0F1VSWHTH9EM",3,"MIT","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: godot-2d\ndescription: 写 Godot 4 的 2D 场景时用。CharacterBody2D 角色移动与平台跳跃、碰撞层、Area2D、TileMapLayer 瓦片地图与地形自动接边、Camera2D 跟随 平滑 limit 震屏、Parallax2D、y_sort 绘制顺序、像素风缩放、2D 光照、寻路、射线与物理查询、_draw 自绘。也用于查某个 2D 需求有没有内置节点。3D 里放 2D 角色见 godot-2d-in-3d。\n---\n\n# Godot 2D\n\n2D 游戏常见需求的内置节点选择、最短写法和易错点。\n\n## 范围\n\n| 不含 | 去哪 |\n|---|---|\n| 动画播放、Tween | godot-animation |\n| shader、粒子、命中闪白写法 | godot-shaders-vfx |\n| UI 控件、HUD 布局 | godot-ui |\n| 输入映射 | godot-input |\n| 3D 场景里放 2D 角色 | godot-2d-in-3d |\n| 大量实体的性能 | godot-performance |\n\n## 先查内置\n\n| 需求 | 用这个 | 别自己写 |\n|---|---|---|\n| 角色、敌人移动与碰撞 | `CharacterBody2D.move_and_slide` | 手写碰撞检测与滑动 |\n| 单向平台 | `CollisionShape2D.one_way_collision` | 按 Y 坐标手动开关碰撞 |\n| 推得动的箱子、球 | `RigidBody2D`，一次性冲击 `apply_central_impulse`，持续推力 `apply_central_force` | 每帧改 `position` 或 `linear_velocity` |\n| 拾取、伤害区、触发区 | `Area2D` 加信号 | 手写矩形相交 |\n| 脚下、身前持续探测 | `RayCast2D`、`ShapeCast2D` 节点 | 每帧 new 查询参数 |\n| 一次性射线、点选、范围内有谁 | `direct_space_state` 的 `intersect_ray`、`intersect_point`、`intersect_shape` | 遍历全部物体手算相交 |\n| 瓦片地图 | `TileMapLayer` 加 `TileSet` | `TileMap` 已弃用，每格一个节点 |\n| 相机边界 | `Camera2D` 的 `limit_*` | 每帧手写夹取 |\n| 相机平滑与死区 | `position_smoothing_enabled`、`drag_*_enabled` | 手写 SmoothDamp |\n| 震屏 | `Camera2D.offset` 加 `FastNoiseLite` | 移动相机节点本身 |\n| 视差背景 | `Parallax2D`（4.3+） | `ParallaxBackground` 与 `ParallaxLayer` 已弃用，手算偏移 |\n| 是否在屏幕内 | `VisibleOnScreenNotifier2D` | 手写矩形与相机比较 |\n| 离屏暂停逻辑 | `VisibleOnScreenEnabler2D` | 每帧距离判断 |\n| 遮挡排序 | `y_sort_enabled`、`z_index` | 每帧改 z_index |\n| 固定在屏幕上的层 | `CanvasLayer` | 手算相机反向偏移 |\n| 光照与阴影 | `PointLight2D`、`DirectionalLight2D`、`LightOccluder2D`、`CanvasModulate` | 多个 SubViewport 拼光照 |\n| 泛光 | `WorldEnvironment` 的 `Environment.glow_enabled` | SubViewport 手搓 bloom |\n| 实时寻路 | `NavigationRegion2D` 加 `NavigationAgent2D` | 手写 A* 与路径跟随 |\n| 格子寻路 | `AStarGrid2D` | 手写 A* |\n| 线、轨迹、血条形状 | `Line2D`、`Polygon2D`、`_draw` | 一格一个 `ColorRect` |\n| 大量相同物体 | `MultiMeshInstance2D` | 几千个 Sprite2D |\n| 像素风 | 项目设置，见下 | 手写缩放与取整 |\n| 命中闪白 | shader uniform 加 Tween | 把 Modulate 调到大于 1 |\n\n## 做法\n\n### CharacterBody2D\n\n平台跳跃：\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\nconst SPEED := 160.0\nconst JUMP := -320.0\n\nfunc _physics_process(delta: float) -> void:\n\tif not is_on_floor():\n\t\tvelocity += get_gravity() * delta\n\telif Input.is_action_just_pressed(\"jump\"):\n\t\tvelocity.y = JUMP\n\tvelocity.x = Input.get_axis(\"left\", \"right\") * SPEED\n\tmove_and_slide()\n```\n\n俯视角：\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\nfunc _physics_process(_delta: float) -> void:\n\tvelocity = Input.get_vector(\"left\", \"right\", \"up\", \"down\") * 120.0\n\tmove_and_slide()\n```\n\n| 属性或方法 | 用途 |\n|---|---|\n| `motion_mode` | 俯视角设 `MOTION_MODE_FLOATING`，所有碰撞按墙处理 |\n| `floor_snap_length` | 下坡不脱地 |\n| `floor_constant_speed` | 上下坡速度一致 |\n| `floor_stop_on_slope` | 站定不下滑 |\n| `platform_on_leave` | 移动平台带动角色是内置的，此项管离开时的速度 |\n| `get_slide_collision(i).get_collider()` | 本帧撞到什么，数量 `get_slide_collision_count()` |\n\n- `velocity` 单位像素每秒，`move_and_slide` 不乘 delta，`move_and_collide` 要乘\n- 默认 grounded 模式按 `up_direction` 区分地面墙天花板，斜坡加减速\n\n### 单向平台与推动刚体\n\n- 单向平台：平台的 `CollisionShape2D` 勾 `one_way_collision`\n- 角色撞上 `RigidBody2D` 不推动它，每物理帧对它 `apply_central_force`\n- 下穿、漏穿、推箱写法见 [references\u002Fbodies.md](references\u002Fbodies.md)\n\n### 碰撞层\n\nlayer 是我在哪一层，mask 是我扫描哪些层。先在项目设置里给层起名，代码只用 1 到 32 的编号。\n\n```ini\n[layer_names]\n\n2d_physics\u002Flayer_1=\"world\"\n2d_physics\u002Flayer_2=\"player\"\n2d_physics\u002Flayer_3=\"enemy\"\n2d_physics\u002Flayer_4=\"player_hitbox\"\n2d_physics\u002Flayer_5=\"enemy_hitbox\"\n```\n\n| 对象 | layer | mask |\n|---|---|---|\n| 地形、墙 | world | 无 |\n| 玩家 | player | world |\n| 敌人 | enemy | world |\n| 玩家攻击判定 Area2D | player_hitbox | enemy |\n| 敌人攻击判定 Area2D | enemy_hitbox | player |\n| 拾取物 Area2D | 无 | player |\n\n- 检测方 Area2D 只设 mask，除非别的 Area2D 要检测它\n- 改单个位：`set_collision_layer_value(2, true)`，编号从 1 起\n- 函数参数里的位掩码是 `1 \u003C\u003C (层号 - 1)`，全部层 `0xffffffff`\n- 敌人互不挤：敌人的 mask 不放 enemy 层\n\n### Area2D\n\n\u003C!-- check: extends Area2D -->\n```gdscript\nsignal collected(by: Node2D)\n\n@onready var _shape: CollisionShape2D = $CollisionShape2D\n\nfunc _ready() -> void:\n\tbody_entered.connect(_on_body_entered)\n\n\nfunc _on_body_entered(body: Node2D) -> void:\n\tcollected.emit(body)\n\t_shape.set_deferred(\"disabled\", true)\n```\n\n- `monitoring` 是我检测别人，`monitorable` 是别人能检测我\n- 信号回调里禁用形状、改 `monitoring` 用 `set_deferred`\n- `get_overlapping_bodies` 每物理步更新一次，刚移动完查不到，优先用信号\n- 撞 TileMapLayer 时 `body_entered` 的参数是 `TileMapLayer`，不是格子\n- 回查格子见 [references\u002Ftilemaplayer.md](references\u002Ftilemaplayer.md)\n\n### 射线与空间查询\n\n| 需求 | 用这个 |\n|---|---|\n| 固定方向持续探测，脚下、身前 | `RayCast2D` 节点，每物理步自动更新 |\n| 有宽度的探测，台阶、宽激光 | `ShapeCast2D` 节点 |\n| 一次性射线，hitscan、视线 | `intersect_ray` |\n| 点下去有谁 | `intersect_point` |\n| 圆形或矩形范围内有谁 | `intersect_shape` |\n\n```ini\n[node name=\"GroundProbe\" type=\"RayCast2D\" parent=\".\"]\ntarget_position = Vector2(0, 12)\ncollision_mask = 1\n```\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\n@onready var _ground: RayCast2D = $GroundProbe\n\nfunc _physics_process(_delta: float) -> void:\n\tif _ground.is_colliding():\n\t\tvar point: Vector2 = _ground.get_collision_point()\n\t\tprint(point, _ground.get_collider())\n```\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\nconst MASK := (1 \u003C\u003C 0) | (1 \u003C\u003C 2)\n\nfunc _physics_process(_delta: float) -> void:\n\tif not Input.is_action_just_pressed(\"fire\"):\n\t\treturn\n\tvar query := PhysicsRayQueryParameters2D.create(\n\t\t\tglobal_position, get_global_mouse_position(), MASK, [get_rid()])\n\tvar hit: Dictionary = get_world_2d().direct_space_state.intersect_ray(query)\n\tif not hit.is_empty():\n\t\tvar point: Vector2 = hit.position\n\t\tprint(point, hit.collider)\n```\n\n- `RayCast2D.target_position` 相对自己\n- `exclude_parent` 默认 true，排除父级碰撞体\n- 同一物理步改了位置要读结果，先 `force_raycast_update()`\n- `enabled` 为 false 时 `force_raycast_update()` 仍有效\n- 查询参数的 mask 默认全部层，节点的 `collision_mask` 默认只有第 1 层\n\n- `intersect_ray` 返回字典，没命中为空\n- `intersect_point` `intersect_shape` 返回字典数组，无 `position`\n- ShapeCast2D、范围与点查询、结果字段见 [references\u002Fphysics-queries.md](references\u002Fphysics-queries.md)\n\n### TileMapLayer\n\n一层一个节点，多层靠多个节点，旧 `TileMap` 在编辑器里一键转换。\n\n- 读写用 `set_cell`、`erase_cell`、`get_cell_tile_data`、`local_to_map`\n- 地形接边用 `set_cells_terrain_connect`，不手写位掩码，挖掉时 terrain 传 -1\n- `erase_cell` 不刷新邻格地形\n- 碰撞、导航、遮挡、自定义数据、地形先在 TileSet 建层，再给瓦片填\n- 宝箱、火把等带逻辑物件用 Scenes Collection 源，或直接放场景\n- 预置格子用无头脚本 `set_cell` 加 `ResourceSaver.save` 生成\n- 手编 `tile_map_data` 头 2 字节须为 0，否则整层读成 0 格\n- 配置表、peering bit、运行时改瓦片、Y 排序见 [references\u002Ftilemaplayer.md](references\u002Ftilemaplayer.md)\n\n### Camera2D\n\n```ini\n[node name=\"Camera2D\" type=\"Camera2D\" parent=\"Player\"]\nposition_smoothing_enabled = true\nposition_smoothing_speed = 6.0\nlimit_left = 0\nlimit_top = 0\nlimit_right = 2560\nlimit_bottom = 720\n```\n\n- 相机做玩家子节点，跟随、边界、平滑、死区都内置\n- `limit_*` 是整数像素\n- 震屏改 `offset` 不改节点位置，噪声用 `FastNoiseLite`\n- `offset` 在 limit 之后叠加，贴边会露出界外，要夹紧\n- 复活、传送后同一段代码里紧接着调 `reset_smoothing()`\n- 不在相机里比较位移距离猜传送，冲刺会误判\n- 视差背景用 `Parallax2D` 4.3+，`scroll_scale` 小于 1 是远景\n- 画面抖、`zoom`、完整震屏、算 limit、Parallax2D 摆法见 [references\u002Fcamera-parallax.md](references\u002Fcamera-parallax.md)\n\n### 绘制顺序\n\n| 工具 | 规则 |\n|---|---|\n| `y_sort_enabled` | 共同父节点开，子节点按原点 Y 排序，角色原点放脚底 |\n| 子节点未开 y_sort | 整棵子树作为一个整体参与排序 |\n| `z_index` | Y 排序只在同 `z_index` 间生效，默认相对父节点累加 |\n| `z_as_relative` | 关掉后 `z_index` 是绝对值 |\n| 同级不排序 | 场景树里靠后的画在上面 |\n| `CanvasLayer` | 不随 Camera2D 移动缩放，`layer` 大的在上，负数在世界后 |\n\n- HUD、暂停菜单、转场放 CanvasLayer，不靠 `z_index` 堆高\n- 同一 `layer` 值的多个 CanvasLayer 前后顺序不确定\n- 跟着世界走带深度感：`follow_viewport_enabled` 加 `follow_viewport_scale`\n\n### 像素风\n\n| 路线 | 设置 |\n|---|---|\n| 低分辨率整体放大 | `display\u002Fwindow\u002Fstretch\u002Fmode` 设 `viewport`，`display\u002Fwindow\u002Fstretch\u002Fscale_mode` 设 `integer` |\n| 高分辨率加取整 | `canvas_items`，开 `rendering\u002F2d\u002Fsnap\u002Fsnap_2d_transforms_to_pixel` |\n\n- 两条路线都把 `rendering\u002Ftextures\u002Fcanvas_textures\u002Fdefault_texture_filter` 设 0 即 Nearest\n- 4.7 新建项目默认 `canvas_items` 加 `expand`，要手动改\n- `Sprite2D.centered` 默认 true，奇数尺寸贴图落在半像素上变形\n- 完整设置、抖动排查、字体、光影分辨率见 [references\u002Fpixel-art.md](references\u002Fpixel-art.md)\n\n### 光照、离屏、寻路、自绘\n\n| 需求 | 要点 | 文件 |\n|---|---|---|\n| 2D 光照与阴影 | `CanvasModulate` 压暗，`PointLight2D` 必须有 `texture`，`LightOccluder2D` 投影 | [lighting-glow.md](references\u002Flighting-glow.md) |\n| 泛光与 HDR 2D | `rendering\u002Fviewport\u002Fhdr_2d` 加 `WorldEnvironment`，`modulate` 大于 1 发光 | [lighting-glow.md](references\u002Flighting-glow.md) |\n| 离屏销毁与暂停 | `VisibleOnScreenNotifier2D`，`VisibleOnScreenEnabler2D` | [navigation-culling.md](references\u002Fnavigation-culling.md) |\n| 寻路 | `NavigationRegion2D` 烘焙，`NavigationAgent2D` 每物理帧取 `get_next_path_position` | [navigation-culling.md](references\u002Fnavigation-culling.md) |\n| 线、多边形、网格线 | `Line2D`、`Polygon2D`、`_draw` 加 `queue_redraw` | [drawing.md](references\u002Fdrawing.md) |\n\n## 陷阱\n\n| 现象 | 做法 |\n|---|---|\n| 信号回调里直接改碰撞形状 `disabled` 出错 | 用 `set_deferred` |\n| `_process` 或 `_input` 里查 `direct_space_state` 结果滞后，物理单独线程时报 `Space state is inaccessible` | 查询放进 `_physics_process`，输入里只记标志 |\n| `PhysicsRayQueryParameters2D` 命中发射者自己 | `exclude` 填 `[get_rid()]`，查询不会自动排除 |\n| 射线与点查询打不到 `Area2D` | `collide_with_areas` 默认 false，手动开 |\n| Area2D 检测不到 TileMapLayer 或 StaticBody2D | 对方 layer 放进 mask，TileSet 配碰撞形状 |\n| 静止的 Area2D 检测不到后生成或瞬移进来的 StaticBody2D | 会动的固体用 `AnimatableBody2D` |\n| `Camera2D.zoom` 放大后文字糊 | 文字放进 CanvasLayer，或开 MSDF |\n| `viewport` 拉伸下精灵无亚像素位置和旋转 | 需要时改 `canvas_items` 加取整 |\n| 2D 节点每帧手算透视缩放伪 3D | 改真 3D 加 `Sprite3D`，见 godot-2d-in-3d |\n\n## 参考\n\n- [references\u002Fcsharp.md](references\u002Fcsharp.md)：C# 项目先读，本文各节示例的 C# 写法\n- [references\u002Fcamera-parallax.md](references\u002Fcamera-parallax.md)：相机边界、平滑死区、完整震屏、Parallax2D 尺寸与摆法\n- [references\u002Fbodies.md](references\u002Fbodies.md)：单向平台、下穿、推动刚体、改刚体状态\n- [references\u002Fphysics-queries.md](references\u002Fphysics-queries.md)：ShapeCast2D、`intersect_shape`、`intersect_point`、结果字段\n- [references\u002Ftilemaplayer.md](references\u002Ftilemaplayer.md)：TileSet 配置表、格子读写、地形、碰撞回查、运行时改瓦片、Y 排序\n- [references\u002Fpixel-art.md](references\u002Fpixel-art.md)：两条像素风路线、抖动排查、导入与字体、光影分辨率\n- [references\u002Flighting-glow.md](references\u002Flighting-glow.md)：2D 光照与阴影、HDR 2D 与 glow\n- [references\u002Fnavigation-culling.md](references\u002Fnavigation-culling.md)：VisibleOnScreen 系列、NavigationAgent2D 最短用法\n- [references\u002Fdrawing.md](references\u002Fdrawing.md)：Line2D、Polygon2D、`_draw` 的选择与写法\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002Fphysics\u002Fray-casting.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002Fusing_tilemaps.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002F2d_parallax.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002F2d_lights_and_shadows.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002Fcanvas_layers.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002Frendering\u002Fmultiple_resolutions.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002Fnavigation\u002Fnavigation_introduction_2d.html\n","# Godot 2D\n\n2D 游戏常见需求的内置节点选择、最短写法和易错点。\n\n## 范围\n\n| 不含 | 去哪 |\n|---|---|\n| 动画播放、Tween | godot-animation |\n| shader、粒子、命中闪白写法 | godot-shaders-vfx |\n| UI 控件、HUD 布局 | godot-ui |\n| 输入映射 | godot-input |\n| 3D 场景里放 2D 角色 | godot-2d-in-3d |\n| 大量实体的性能 | godot-performance |\n\n## 先查内置\n\n| 需求 | 用这个 | 别自己写 |\n|---|---|---|\n| 角色、敌人移动与碰撞 | `CharacterBody2D.move_and_slide` | 手写碰撞检测与滑动 |\n| 单向平台 | `CollisionShape2D.one_way_collision` | 按 Y 坐标手动开关碰撞 |\n| 推得动的箱子、球 | `RigidBody2D`，一次性冲击 `apply_central_impulse`，持续推力 `apply_central_force` | 每帧改 `position` 或 `linear_velocity` |\n| 拾取、伤害区、触发区 | `Area2D` 加信号 | 手写矩形相交 |\n| 脚下、身前持续探测 | `RayCast2D`、`ShapeCast2D` 节点 | 每帧 new 查询参数 |\n| 一次性射线、点选、范围内有谁 | `direct_space_state` 的 `intersect_ray`、`intersect_point`、`intersect_shape` | 遍历全部物体手算相交 |\n| 瓦片地图 | `TileMapLayer` 加 `TileSet` | `TileMap` 已弃用，每格一个节点 |\n| 相机边界 | `Camera2D` 的 `limit_*` | 每帧手写夹取 |\n| 相机平滑与死区 | `position_smoothing_enabled`、`drag_*_enabled` | 手写 SmoothDamp |\n| 震屏 | `Camera2D.offset` 加 `FastNoiseLite` | 移动相机节点本身 |\n| 视差背景 | `Parallax2D`（4.3+） | `ParallaxBackground` 与 `ParallaxLayer` 已弃用，手算偏移 |\n| 是否在屏幕内 | `VisibleOnScreenNotifier2D` | 手写矩形与相机比较 |\n| 离屏暂停逻辑 | `VisibleOnScreenEnabler2D` | 每帧距离判断 |\n| 遮挡排序 | `y_sort_enabled`、`z_index` | 每帧改 z_index |\n| 固定在屏幕上的层 | `CanvasLayer` | 手算相机反向偏移 |\n| 光照与阴影 | `PointLight2D`、`DirectionalLight2D`、`LightOccluder2D`、`CanvasModulate` | 多个 SubViewport 拼光照 |\n| 泛光 | `WorldEnvironment` 的 `Environment.glow_enabled` | SubViewport 手搓 bloom |\n| 实时寻路 | `NavigationRegion2D` 加 `NavigationAgent2D` | 手写 A* 与路径跟随 |\n| 格子寻路 | `AStarGrid2D` | 手写 A* |\n| 线、轨迹、血条形状 | `Line2D`、`Polygon2D`、`_draw` | 一格一个 `ColorRect` |\n| 大量相同物体 | `MultiMeshInstance2D` | 几千个 Sprite2D |\n| 像素风 | 项目设置，见下 | 手写缩放与取整 |\n| 命中闪白 | shader uniform 加 Tween | 把 Modulate 调到大于 1 |\n\n## 做法\n\n### CharacterBody2D\n\n平台跳跃：\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\nconst SPEED := 160.0\nconst JUMP := -320.0\n\nfunc _physics_process(delta: float) -> void:\n\tif not is_on_floor():\n\t\tvelocity += get_gravity() * delta\n\telif Input.is_action_just_pressed(\"jump\"):\n\t\tvelocity.y = JUMP\n\tvelocity.x = Input.get_axis(\"left\", \"right\") * SPEED\n\tmove_and_slide()\n```\n\n俯视角：\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\nfunc _physics_process(_delta: float) -> void:\n\tvelocity = Input.get_vector(\"left\", \"right\", \"up\", \"down\") * 120.0\n\tmove_and_slide()\n```\n\n| 属性或方法 | 用途 |\n|---|---|\n| `motion_mode` | 俯视角设 `MOTION_MODE_FLOATING`，所有碰撞按墙处理 |\n| `floor_snap_length` | 下坡不脱地 |\n| `floor_constant_speed` | 上下坡速度一致 |\n| `floor_stop_on_slope` | 站定不下滑 |\n| `platform_on_leave` | 移动平台带动角色是内置的，此项管离开时的速度 |\n| `get_slide_collision(i).get_collider()` | 本帧撞到什么，数量 `get_slide_collision_count()` |\n\n- `velocity` 单位像素每秒，`move_and_slide` 不乘 delta，`move_and_collide` 要乘\n- 默认 grounded 模式按 `up_direction` 区分地面墙天花板，斜坡加减速\n\n### 单向平台与推动刚体\n\n- 单向平台：平台的 `CollisionShape2D` 勾 `one_way_collision`\n- 角色撞上 `RigidBody2D` 不推动它，每物理帧对它 `apply_central_force`\n- 下穿、漏穿、推箱写法见 [references\u002Fbodies.md](references\u002Fbodies.md)\n\n### 碰撞层\n\nlayer 是我在哪一层，mask 是我扫描哪些层。先在项目设置里给层起名，代码只用 1 到 32 的编号。\n\n```ini\n[layer_names]\n\n2d_physics\u002Flayer_1=\"world\"\n2d_physics\u002Flayer_2=\"player\"\n2d_physics\u002Flayer_3=\"enemy\"\n2d_physics\u002Flayer_4=\"player_hitbox\"\n2d_physics\u002Flayer_5=\"enemy_hitbox\"\n```\n\n| 对象 | layer | mask |\n|---|---|---|\n| 地形、墙 | world | 无 |\n| 玩家 | player | world |\n| 敌人 | enemy | world |\n| 玩家攻击判定 Area2D | player_hitbox | enemy |\n| 敌人攻击判定 Area2D | enemy_hitbox | player |\n| 拾取物 Area2D | 无 | player |\n\n- 检测方 Area2D 只设 mask，除非别的 Area2D 要检测它\n- 改单个位：`set_collision_layer_value(2, true)`，编号从 1 起\n- 函数参数里的位掩码是 `1 \u003C\u003C (层号 - 1)`，全部层 `0xffffffff`\n- 敌人互不挤：敌人的 mask 不放 enemy 层\n\n### Area2D\n\n\u003C!-- check: extends Area2D -->\n```gdscript\nsignal collected(by: Node2D)\n\n@onready var _shape: CollisionShape2D = $CollisionShape2D\n\nfunc _ready() -> void:\n\tbody_entered.connect(_on_body_entered)\n\n\nfunc _on_body_entered(body: Node2D) -> void:\n\tcollected.emit(body)\n\t_shape.set_deferred(\"disabled\", true)\n```\n\n- `monitoring` 是我检测别人，`monitorable` 是别人能检测我\n- 信号回调里禁用形状、改 `monitoring` 用 `set_deferred`\n- `get_overlapping_bodies` 每物理步更新一次，刚移动完查不到，优先用信号\n- 撞 TileMapLayer 时 `body_entered` 的参数是 `TileMapLayer`，不是格子\n- 回查格子见 [references\u002Ftilemaplayer.md](references\u002Ftilemaplayer.md)\n\n### 射线与空间查询\n\n| 需求 | 用这个 |\n|---|---|\n| 固定方向持续探测，脚下、身前 | `RayCast2D` 节点，每物理步自动更新 |\n| 有宽度的探测，台阶、宽激光 | `ShapeCast2D` 节点 |\n| 一次性射线，hitscan、视线 | `intersect_ray` |\n| 点下去有谁 | `intersect_point` |\n| 圆形或矩形范围内有谁 | `intersect_shape` |\n\n```ini\n[node name=\"GroundProbe\" type=\"RayCast2D\" parent=\".\"]\ntarget_position = Vector2(0, 12)\ncollision_mask = 1\n```\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\n@onready var _ground: RayCast2D = $GroundProbe\n\nfunc _physics_process(_delta: float) -> void:\n\tif _ground.is_colliding():\n\t\tvar point: Vector2 = _ground.get_collision_point()\n\t\tprint(point, _ground.get_collider())\n```\n\n\u003C!-- check: extends CharacterBody2D -->\n```gdscript\nconst MASK := (1 \u003C\u003C 0) | (1 \u003C\u003C 2)\n\nfunc _physics_process(_delta: float) -> void:\n\tif not Input.is_action_just_pressed(\"fire\"):\n\t\treturn\n\tvar query := PhysicsRayQueryParameters2D.create(\n\t\t\tglobal_position, get_global_mouse_position(), MASK, [get_rid()])\n\tvar hit: Dictionary = get_world_2d().direct_space_state.intersect_ray(query)\n\tif not hit.is_empty():\n\t\tvar point: Vector2 = hit.position\n\t\tprint(point, hit.collider)\n```\n\n- `RayCast2D.target_position` 相对自己\n- `exclude_parent` 默认 true，排除父级碰撞体\n- 同一物理步改了位置要读结果，先 `force_raycast_update()`\n- `enabled` 为 false 时 `force_raycast_update()` 仍有效\n- 查询参数的 mask 默认全部层，节点的 `collision_mask` 默认只有第 1 层\n\n- `intersect_ray` 返回字典，没命中为空\n- `intersect_point` `intersect_shape` 返回字典数组，无 `position`\n- ShapeCast2D、范围与点查询、结果字段见 [references\u002Fphysics-queries.md](references\u002Fphysics-queries.md)\n\n### TileMapLayer\n\n一层一个节点，多层靠多个节点，旧 `TileMap` 在编辑器里一键转换。\n\n- 读写用 `set_cell`、`erase_cell`、`get_cell_tile_data`、`local_to_map`\n- 地形接边用 `set_cells_terrain_connect`，不手写位掩码，挖掉时 terrain 传 -1\n- `erase_cell` 不刷新邻格地形\n- 碰撞、导航、遮挡、自定义数据、地形先在 TileSet 建层，再给瓦片填\n- 宝箱、火把等带逻辑物件用 Scenes Collection 源，或直接放场景\n- 预置格子用无头脚本 `set_cell` 加 `ResourceSaver.save` 生成\n- 手编 `tile_map_data` 头 2 字节须为 0，否则整层读成 0 格\n- 配置表、peering bit、运行时改瓦片、Y 排序见 [references\u002Ftilemaplayer.md](references\u002Ftilemaplayer.md)\n\n### Camera2D\n\n```ini\n[node name=\"Camera2D\" type=\"Camera2D\" parent=\"Player\"]\nposition_smoothing_enabled = true\nposition_smoothing_speed = 6.0\nlimit_left = 0\nlimit_top = 0\nlimit_right = 2560\nlimit_bottom = 720\n```\n\n- 相机做玩家子节点，跟随、边界、平滑、死区都内置\n- `limit_*` 是整数像素\n- 震屏改 `offset` 不改节点位置，噪声用 `FastNoiseLite`\n- `offset` 在 limit 之后叠加，贴边会露出界外，要夹紧\n- 复活、传送后同一段代码里紧接着调 `reset_smoothing()`\n- 不在相机里比较位移距离猜传送，冲刺会误判\n- 视差背景用 `Parallax2D` 4.3+，`scroll_scale` 小于 1 是远景\n- 画面抖、`zoom`、完整震屏、算 limit、Parallax2D 摆法见 [references\u002Fcamera-parallax.md](references\u002Fcamera-parallax.md)\n\n### 绘制顺序\n\n| 工具 | 规则 |\n|---|---|\n| `y_sort_enabled` | 共同父节点开，子节点按原点 Y 排序，角色原点放脚底 |\n| 子节点未开 y_sort | 整棵子树作为一个整体参与排序 |\n| `z_index` | Y 排序只在同 `z_index` 间生效，默认相对父节点累加 |\n| `z_as_relative` | 关掉后 `z_index` 是绝对值 |\n| 同级不排序 | 场景树里靠后的画在上面 |\n| `CanvasLayer` | 不随 Camera2D 移动缩放，`layer` 大的在上，负数在世界后 |\n\n- HUD、暂停菜单、转场放 CanvasLayer，不靠 `z_index` 堆高\n- 同一 `layer` 值的多个 CanvasLayer 前后顺序不确定\n- 跟着世界走带深度感：`follow_viewport_enabled` 加 `follow_viewport_scale`\n\n### 像素风\n\n| 路线 | 设置 |\n|---|---|\n| 低分辨率整体放大 | `display\u002Fwindow\u002Fstretch\u002Fmode` 设 `viewport`，`display\u002Fwindow\u002Fstretch\u002Fscale_mode` 设 `integer` |\n| 高分辨率加取整 | `canvas_items`，开 `rendering\u002F2d\u002Fsnap\u002Fsnap_2d_transforms_to_pixel` |\n\n- 两条路线都把 `rendering\u002Ftextures\u002Fcanvas_textures\u002Fdefault_texture_filter` 设 0 即 Nearest\n- 4.7 新建项目默认 `canvas_items` 加 `expand`，要手动改\n- `Sprite2D.centered` 默认 true，奇数尺寸贴图落在半像素上变形\n- 完整设置、抖动排查、字体、光影分辨率见 [references\u002Fpixel-art.md](references\u002Fpixel-art.md)\n\n### 光照、离屏、寻路、自绘\n\n| 需求 | 要点 | 文件 |\n|---|---|---|\n| 2D 光照与阴影 | `CanvasModulate` 压暗，`PointLight2D` 必须有 `texture`，`LightOccluder2D` 投影 | [lighting-glow.md](references\u002Flighting-glow.md) |\n| 泛光与 HDR 2D | `rendering\u002Fviewport\u002Fhdr_2d` 加 `WorldEnvironment`，`modulate` 大于 1 发光 | [lighting-glow.md](references\u002Flighting-glow.md) |\n| 离屏销毁与暂停 | `VisibleOnScreenNotifier2D`，`VisibleOnScreenEnabler2D` | [navigation-culling.md](references\u002Fnavigation-culling.md) |\n| 寻路 | `NavigationRegion2D` 烘焙，`NavigationAgent2D` 每物理帧取 `get_next_path_position` | [navigation-culling.md](references\u002Fnavigation-culling.md) |\n| 线、多边形、网格线 | `Line2D`、`Polygon2D`、`_draw` 加 `queue_redraw` | [drawing.md](references\u002Fdrawing.md) |\n\n## 陷阱\n\n| 现象 | 做法 |\n|---|---|\n| 信号回调里直接改碰撞形状 `disabled` 出错 | 用 `set_deferred` |\n| `_process` 或 `_input` 里查 `direct_space_state` 结果滞后，物理单独线程时报 `Space state is inaccessible` | 查询放进 `_physics_process`，输入里只记标志 |\n| `PhysicsRayQueryParameters2D` 命中发射者自己 | `exclude` 填 `[get_rid()]`，查询不会自动排除 |\n| 射线与点查询打不到 `Area2D` | `collide_with_areas` 默认 false，手动开 |\n| Area2D 检测不到 TileMapLayer 或 StaticBody2D | 对方 layer 放进 mask，TileSet 配碰撞形状 |\n| 静止的 Area2D 检测不到后生成或瞬移进来的 StaticBody2D | 会动的固体用 `AnimatableBody2D` |\n| `Camera2D.zoom` 放大后文字糊 | 文字放进 CanvasLayer，或开 MSDF |\n| `viewport` 拉伸下精灵无亚像素位置和旋转 | 需要时改 `canvas_items` 加取整 |\n| 2D 节点每帧手算透视缩放伪 3D | 改真 3D 加 `Sprite3D`，见 godot-2d-in-3d |\n\n## 参考\n\n- [references\u002Fcsharp.md](references\u002Fcsharp.md)：C# 项目先读，本文各节示例的 C# 写法\n- [references\u002Fcamera-parallax.md](references\u002Fcamera-parallax.md)：相机边界、平滑死区、完整震屏、Parallax2D 尺寸与摆法\n- [references\u002Fbodies.md](references\u002Fbodies.md)：单向平台、下穿、推动刚体、改刚体状态\n- [references\u002Fphysics-queries.md](references\u002Fphysics-queries.md)：ShapeCast2D、`intersect_shape`、`intersect_point`、结果字段\n- [references\u002Ftilemaplayer.md](references\u002Ftilemaplayer.md)：TileSet 配置表、格子读写、地形、碰撞回查、运行时改瓦片、Y 排序\n- [references\u002Fpixel-art.md](references\u002Fpixel-art.md)：两条像素风路线、抖动排查、导入与字体、光影分辨率\n- [references\u002Flighting-glow.md](references\u002Flighting-glow.md)：2D 光照与阴影、HDR 2D 与 glow\n- [references\u002Fnavigation-culling.md](references\u002Fnavigation-culling.md)：VisibleOnScreen 系列、NavigationAgent2D 最短用法\n- [references\u002Fdrawing.md](references\u002Fdrawing.md)：Line2D、Polygon2D、`_draw` 的选择与写法\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002Fphysics\u002Fray-casting.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002Fusing_tilemaps.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002F2d_parallax.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002F2d_lights_and_shadows.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002F2d\u002Fcanvas_layers.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002Frendering\u002Fmultiple_resolutions.html\n- https:\u002F\u002Fdocs.godotengine.org\u002Fen\u002Fstable\u002Ftutorials\u002Fnavigation\u002Fnavigation_introduction_2d.html\n",{"name":5,"description":7},"master","d9cc24874d2a7b2d0f9fa2382a02c42969a1e092","skills\u002Fgodot-2d",0,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills","https:\u002F\u002Fgithub.com\u002FMindsMaster","Full-stack developer","2026-11-10 12:36:07",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add MindsMaster\u002Fgodot-claude-code-skills --skill godot-2d",{"tool":38,"command":39},"bunx","bunx skills add MindsMaster\u002Fgodot-claude-code-skills --skill godot-2d",{"tool":41,"command":42},"pnpm","pnpm dlx skills add MindsMaster\u002Fgodot-claude-code-skills --skill godot-2d","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002FSKILL.md",true,[46,52,56,60,64,68,72,76,80],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fbodies.md","REFERENCE","参考文档",1036,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fbodies.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fcamera-parallax.md",6130,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fcamera-parallax.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fcsharp.md",2896,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fcsharp.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fdrawing.md",4621,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fdrawing.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Flighting-glow.md",3143,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Flighting-glow.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fnavigation-culling.md",4667,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fnavigation-culling.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fphysics-queries.md",4806,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fphysics-queries.md",{"path":77,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fpixel-art.md",4258,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Fpixel-art.md",{"path":81,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Ftilemaplayer.md",13290,"https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-2d\u002Freferences\u002Ftilemaplayer.md",[85,92,99,106,113,120],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7FBP7NJ4NTGA239X15MXQPK","godot-ui","写菜单 HUD 对话框 血条 设置界面 本地化 分辨率适配 UI 导航时用，做设置即时生效 窗口模式 全屏 窗口尺寸确认还原 失焦暂停时也用。Control 布局 Container anchors、项目级 Theme 统一字体、StyleBox、ProgressBar 血条、RichTextLabel、多分辨率 stretch aspect、tr() 本地化、手柄焦点导航、mouse_filter 吃点击、CanvasLayer HUD、弹窗 拖放。UI layout, theme, localization, settings menu, fullscreen, pause on focus loss.","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-ui\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7FBP23RTBQ2ZW9SKXE37SFS","godot-shaders-vfx","做受击闪白 受伤变白 命中闪烁 溶解 描边，或从 GDScript 与 C# 改 .gdshader 的 shader 参数 SetInstanceShaderParameter set_shader_parameter 时先用，多个敌人共用一份材质各自闪白也归这里。也管内置材质与 shader 的取舍、instance uniform、屏幕与深度纹理、GPUParticles 粒子、后处理顺序。shaders, hit flash, particles, post-processing.","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-shaders-vfx\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7FBNVCNBKPFGQF5P5QJZMXK","godot-scene-authoring","在 Godot 4 里新做关卡、房间、HUD、菜单、NPC、道具、背景时用，决定内容摆进 .tscn 还是代码运行时搭。新建项目第一个场景，往已有项目加场景，打开场景一片空看不到东西，美术策划要在编辑器里直接看和调，自定义显示节点在编辑器里不显示，@tool 节点把材质 z_index 写进 tscn，确定性模拟 联机 服务器要读场景里摆的位置。先自查项目是摆在场景里还是运行时生成，再按结果新做或迁移。脚本生成 tscn、@tool 自绘节点、预制场景、_validate_property、internal 子节点、NOTIFICATION_EDITOR_PRE_SAVE、C# 重载。level authoring, WYSIWYG, prefab, data-driven, bake on save, empty scene, audit.","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-scene-authoring\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7FBNN4WFN0PHM6P7SDH7V0J","godot-scene-architecture","拆分 Godot 4 场景与组织节点时用。PackedScene 组件复用、节点引用 @onready @export %UniqueName、信号与直接调用的选择、分组 call_group、Autoload 与普通节点、组合与继承、状态机、暂停 process_mode、queue_free 与 is_instance_valid、_ready 顺序、场景切换。scene tree architecture, signals, autoload.","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-scene-architecture\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7FBNFF1K8A77X45BDBQCA6E","godot-resources-data","定义游戏数据表 配置 存档 资源加载时用。自定义 Resource class_name @export .tres 与 C# [GlobalClass]、JSON 与 Resource 怎么选、导入时把 JSON CSV 转成 Resource、资源共享与 duplicate local_to_scene、load preload 与线程加载进度条、user:\u002F\u002F 存档、导出后读不到 res:\u002F\u002F 目录。game data, custom resource, save game.","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-resources-data\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7FBNB7C2A6XE5E48XH5NC5D","godot-performance","排查卡顿 掉帧 帧率低 内存增长时用，也用于几百个怪物 子弹同屏、CharacterBody 拥挤变慢、每帧重建网格、线程池只用上两三个核、C# 跨界开销。先测再改 Profiler Monitors。不降画面与数量的内置解法 管理器统一驱动、MultiMesh、Server、对象池、空间哈希、WorkerThreadPool 分块、网格局部更新、物理插值、线程加载、着色器编译卡顿、每帧分配。Godot performance, stutter, many entities.","https:\u002F\u002Fgithub.com\u002FMindsMaster\u002Fgodot-claude-code-skills\u002Fblob\u002Fmaster\u002Fskills\u002Fgodot-performance\u002FSKILL.md",[],[]]