- schema两件: CampSceneLayerSpec(层键+贴图矩形+命中矩形+命中键)+CampSceneLayoutTable(canvas/hud_band_h/gate_gap/wall_band/layers+validate()按面拆四查:身份贴图/命中边界/命中互斥/围墙带包络) - 数据表camp_scene_layout.tres: 10层坐标唯一事实源(布局草案值+§5已裁:布告板(845,268,130,140)/门扇(520,250,240,220)门洞对齐/帐篷300x170;贴图矩形=contain终稿实测尺寸锚定:底中心/顶锚/底锚按物件语义,campfire命中(560,640,160,80)只取下半) - ConfigDB接线: 表注册+表现域容器camp_scene_layout字段+装载期validate()逐问题_fatal(fail-fast红线:命中区越画面/相交/侵顶栏=数据致命) - CampSceneView: setup_layers/bind_hotspots/get_hotspot_rect/set_feedback_state/set_hud_band五公开口+object_pressed信号; Control根+TextureRect层子节点序=z序(禁CanvasLayer/z_index/Sprite2D); 根单点_gui_input命中判定(层全IGNORE); 四态反馈:悬停=Candle轮廓+名牌(FS_HINT/INK_ON_DEEP/BG_ROOT板,画面内钳制)+Tween逐级整像素浮动/按下=位移1px/禁用=ShaderMaterial去饱和+降明度(零新素材,modulate只有明度轴); 素材缺位程序化占位冒烟安全; 命中键=七物件绑定(gate/forge/dummy/chest/notebook/board/campfire) - V14单测camp_scene_layout_test.gd(11断言): 校验函数通过/七键集/两两不相交/不越画面不侵顶栏/篝火只下半/门扇对齐缺口/布告板挂墙带/10层序/ConfigDB装载链——全表关系谓词零坐标字面量; run_all manifest登记expect=0 - 验证: --editor --quit刷类缓存后V14孤跑绿(11项)+视图孤检绿(9项:子节点序/合成点击信号/悬停名牌/拖出取消/禁用不发/HUD槽——临时件不入库,T5探针承载正式验收); S9/S13归基线(gdstyle新违规4条已按职责轴拆函数清偿:validate按面四拆/_gui_input三拆/setup_layers构建段三拆/循环内分配提_build_layer_node)
83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
[gd_resource type="Resource" script_class="CampSceneLayoutTable" load_steps=13 format=3]
|
|
|
|
[ext_resource type="Script" path="res://data/schemas/camp_scene_layout_table.gd" id="1"]
|
|
[ext_resource type="Script" path="res://data/schemas/camp_scene_layer_spec.gd" id="2"]
|
|
|
|
[sub_resource type="Resource" id="1"]
|
|
script = ExtResource("2")
|
|
key = &"bg"
|
|
texture_rect = Rect2(0, 0, 1280, 800)
|
|
hotspot = Rect2(0, 0, 0, 0)
|
|
hotspot_key = &""
|
|
|
|
[sub_resource type="Resource" id="2"]
|
|
script = ExtResource("2")
|
|
key = &"wall"
|
|
texture_rect = Rect2(0, 261, 1280, 49)
|
|
hotspot = Rect2(0, 0, 0, 0)
|
|
hotspot_key = &""
|
|
|
|
[sub_resource type="Resource" id="3"]
|
|
script = ExtResource("2")
|
|
key = &"board"
|
|
texture_rect = Rect2(845, 268, 130, 121)
|
|
hotspot = Rect2(845, 268, 130, 140)
|
|
hotspot_key = &"board"
|
|
|
|
[sub_resource type="Resource" id="4"]
|
|
script = ExtResource("2")
|
|
key = &"gate"
|
|
texture_rect = Rect2(520, 250, 240, 211)
|
|
hotspot = Rect2(520, 250, 240, 220)
|
|
hotspot_key = &"gate"
|
|
|
|
[sub_resource type="Resource" id="5"]
|
|
script = ExtResource("2")
|
|
key = &"dummy"
|
|
texture_rect = Rect2(340, 520, 120, 180)
|
|
hotspot = Rect2(340, 520, 120, 180)
|
|
hotspot_key = &"dummy"
|
|
|
|
[sub_resource type="Resource" id="6"]
|
|
script = ExtResource("2")
|
|
key = &"forge"
|
|
texture_rect = Rect2(40, 467, 240, 193)
|
|
hotspot = Rect2(40, 420, 240, 240)
|
|
hotspot_key = &"forge"
|
|
|
|
[sub_resource type="Resource" id="7"]
|
|
script = ExtResource("2")
|
|
key = &"tent"
|
|
texture_rect = Rect2(982, 520, 251, 170)
|
|
hotspot = Rect2(0, 0, 0, 0)
|
|
hotspot_key = &""
|
|
|
|
[sub_resource type="Resource" id="8"]
|
|
script = ExtResource("2")
|
|
key = &"chest"
|
|
texture_rect = Rect2(1097, 700, 106, 90)
|
|
hotspot = Rect2(1085, 700, 130, 90)
|
|
hotspot_key = &"chest"
|
|
|
|
[sub_resource type="Resource" id="9"]
|
|
script = ExtResource("2")
|
|
key = &"notebook"
|
|
texture_rect = Rect2(818, 704, 100, 66)
|
|
hotspot = Rect2(818, 690, 100, 80)
|
|
hotspot_key = &"notebook"
|
|
|
|
[sub_resource type="Resource" id="10"]
|
|
script = ExtResource("2")
|
|
key = &"campfire"
|
|
texture_rect = Rect2(560, 571, 160, 149)
|
|
hotspot = Rect2(560, 640, 160, 80)
|
|
hotspot_key = &"campfire"
|
|
|
|
[resource]
|
|
script = ExtResource("1")
|
|
canvas = Vector2(1280, 800)
|
|
hud_band_h = 48
|
|
gate_gap = Vector2i(520, 760)
|
|
wall_band = Rect2(0, 240, 1280, 70)
|
|
layers = [SubResource("1"), SubResource("2"), SubResource("3"), SubResource("4"), SubResource("5"), SubResource("6"), SubResource("7"), SubResource("8"), SubResource("9"), SubResource("10")]
|