Files
IntoHole/playtest/captures/capture_surface_alignment.gd
T
Yanchen d1141b04c7 feat: 更新 IntoHole 的球体、滑槽和环境资产
- 为铁球、陶瓷球和木球制作风格化材质,归档 CC0 原始参考
- 更新方形球洞和实心滑槽,统一 90° 弯槽并兼容旧存档
- 用顺流泡沫表示水流方向,为冰块制作三种交错的裂纹
- 同步 Blender 源资产、Godot 加载、工坊和试玩预览
2026-11-19 16:18:41 +08:00

21 lines
1.2 KiB
GDScript

extends SceneTree
func _initialize() -> void:call_deferred("run")
func run() -> void:
var app=load("res://designer/scenes/workshop.tscn").instantiate();root.add_child(app)
var placement=app.placement
var launch:Dictionary=placement.record_at("directional_boost",Vector3(-1,2,0),0,"launch")
var slope:Dictionary=placement.align_surfaces(placement.record_at("steep",Vector3(0,2,0),2,"slope"),[launch])
var tail:Dictionary=placement.align_surfaces(placement.record_at("straight",Vector3(1,2,0),0,"tail"),[slope])
app.records=[launch,slope,tail]
for y in [0,1]:app.records.append(placement.record_at("wall",Vector3(-1,y,0),0,"wall_%d"%y))
app.spawn_specs=[{"id":"ball","ballTypeId":"iron_ball","position":[-1,3.32,0]}]
app.rebuild();app.reset_simulation();app.select_record("slope")
app.target=Vector3(0,1.5,0);app.camera_size=6.8;app.yaw=.9;app.update_camera()
app.sidebar_scroll.scroll_vertical=150
app.status="陡坡底面 Y 1.82 · 高端槽底 Y 3.00,与加速方块顶面齐平";app.refresh_ui()
for i in range(12):await process_frame
RenderingServer.force_draw(false);RenderingServer.force_sync()
root.get_texture().get_image().save_png(ProjectSettings.globalize_path("res://playtest/artifacts/styled/surface_alignment.png"))
quit()