feat: 建立关卡工坊并整理项目目录
- 加入 Godot 基础试玩、画风展示和通孔验证场景 - 支持自由放球、多层叠放、墙壁、锥口球洞及固定 +5 m/s 定向加速方块 - 保存 Blender 源资产、模型导出、资源制作脚本和关卡编辑存档逻辑 - 按七类目录归档工程,集中 zsh 启动入口并补充 AGENTS.md 文件索引 - 同步设计规则、依赖锁定、验证报告和目录迁移记录 验证:目录迁移后的资源导入与四个场景加载通过;本次提交前检查暂存内容,未重复运行整套物理测试。
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"title": "meadowexample",
|
||||
"assetFamily": "railbound_inspired",
|
||||
"pieces": [
|
||||
{
|
||||
"kind": "y_merge",
|
||||
"position": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_0"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
-1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_1"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
-1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_2"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
-2,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_3"
|
||||
},
|
||||
{
|
||||
"kind": "gentle",
|
||||
"position": [
|
||||
-3,
|
||||
1.5,
|
||||
0
|
||||
],
|
||||
"quarter": 2,
|
||||
"id": "piece_4"
|
||||
},
|
||||
{
|
||||
"kind": "gentle",
|
||||
"position": [
|
||||
-2,
|
||||
1.5,
|
||||
1
|
||||
],
|
||||
"quarter": 2,
|
||||
"id": "piece_5"
|
||||
},
|
||||
{
|
||||
"kind": "turn_ccw",
|
||||
"position": [
|
||||
2,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_6"
|
||||
},
|
||||
{
|
||||
"kind": "turn_cw",
|
||||
"position": [
|
||||
2,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 3,
|
||||
"id": "piece_7"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
3,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_8"
|
||||
},
|
||||
{
|
||||
"kind": "steep",
|
||||
"position": [
|
||||
4,
|
||||
0.5,
|
||||
0
|
||||
],
|
||||
"quarter": 2,
|
||||
"id": "piece_9"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
5,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_10"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
6,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_11"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
7,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_12"
|
||||
},
|
||||
{
|
||||
"id": "terminal_stop",
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
9,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 1
|
||||
}
|
||||
],
|
||||
"balls": [
|
||||
{
|
||||
"id": "iron_A",
|
||||
"pieceId": "piece_4",
|
||||
"pathT": 0.82,
|
||||
"branch": 0
|
||||
},
|
||||
{
|
||||
"id": "iron_B",
|
||||
"pieceId": "piece_5",
|
||||
"pathT": 0.82,
|
||||
"branch": 0
|
||||
}
|
||||
],
|
||||
"goal": [
|
||||
8,
|
||||
0.68,
|
||||
0
|
||||
],
|
||||
"entities": []
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"title": "林间汇流",
|
||||
"assetFamily": "railbound_inspired",
|
||||
"pieces": [
|
||||
{
|
||||
"kind": "y_merge",
|
||||
"position": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_0"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
-1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_1"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
-1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_2"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
-2,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_3"
|
||||
},
|
||||
{
|
||||
"kind": "gentle",
|
||||
"position": [
|
||||
-3,
|
||||
1.5,
|
||||
0
|
||||
],
|
||||
"quarter": 2,
|
||||
"id": "piece_4"
|
||||
},
|
||||
{
|
||||
"kind": "gentle",
|
||||
"position": [
|
||||
-2,
|
||||
1.5,
|
||||
1
|
||||
],
|
||||
"quarter": 2,
|
||||
"id": "piece_5"
|
||||
},
|
||||
{
|
||||
"kind": "turn_ccw",
|
||||
"position": [
|
||||
2,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_6"
|
||||
},
|
||||
{
|
||||
"kind": "turn_cw",
|
||||
"position": [
|
||||
2,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 3,
|
||||
"id": "piece_7"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
3,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_8"
|
||||
},
|
||||
{
|
||||
"kind": "steep",
|
||||
"position": [
|
||||
4,
|
||||
0.5,
|
||||
0
|
||||
],
|
||||
"quarter": 2,
|
||||
"id": "piece_9"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
5,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_10"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
6,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_11"
|
||||
},
|
||||
{
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
7,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 0,
|
||||
"id": "piece_12"
|
||||
},
|
||||
{
|
||||
"id": "terminal_stop",
|
||||
"kind": "straight",
|
||||
"position": [
|
||||
9,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"quarter": 1
|
||||
}
|
||||
],
|
||||
"balls": [
|
||||
{
|
||||
"id": "iron_A",
|
||||
"pieceId": "piece_4",
|
||||
"pathT": 0.82,
|
||||
"branch": 0
|
||||
},
|
||||
{
|
||||
"id": "iron_B",
|
||||
"pieceId": "piece_5",
|
||||
"pathT": 0.82,
|
||||
"branch": 0
|
||||
}
|
||||
],
|
||||
"goal": [
|
||||
8,
|
||||
0.68,
|
||||
0
|
||||
],
|
||||
"entities": []
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://playtest/showcase/scripts/showcase.gd" id="1"]
|
||||
|
||||
[node name="Showcase" type="Node3D"]
|
||||
script = ExtResource("1")
|
||||
@@ -0,0 +1,58 @@
|
||||
extends "res://designer/scripts/studio.gd"
|
||||
|
||||
var speed_slider: HSlider
|
||||
var speed_label: Label
|
||||
var reset_button: Button
|
||||
|
||||
func setup_environment() -> void:
|
||||
super.setup_environment()
|
||||
camera.h_offset=0
|
||||
|
||||
func setup_ui() -> void:
|
||||
var layer:=CanvasLayer.new();add_child(layer)
|
||||
var panel:=PanelContainer.new();layer.add_child(panel)
|
||||
panel.set_anchors_and_offsets_preset(Control.PRESET_CENTER_BOTTOM)
|
||||
panel.offset_left=-340;panel.offset_right=340
|
||||
panel.offset_top=-96;panel.offset_bottom=-24
|
||||
panel.add_theme_stylebox_override("panel",style(PAPER))
|
||||
var controls:=row(panel)
|
||||
controls.add_theme_constant_override("separation",16)
|
||||
run_button=button("启动",toggle_run,true);run_button.custom_minimum_size.x=100
|
||||
controls.add_child(run_button)
|
||||
reset_button=button("重置",reset_simulation);reset_button.custom_minimum_size.x=100
|
||||
controls.add_child(reset_button)
|
||||
var speed_control:=VBoxContainer.new();speed_control.size_flags_horizontal=Control.SIZE_EXPAND_FILL
|
||||
controls.add_child(speed_control)
|
||||
speed_label=label("初速度 0.0 m/s",15);speed_control.add_child(speed_label)
|
||||
speed_slider=HSlider.new();speed_slider.min_value=0;speed_slider.max_value=5
|
||||
speed_slider.step=.1;speed_slider.value=0;speed_slider.custom_minimum_size=Vector2(360,24)
|
||||
speed_slider.value_changed.connect(func(value):speed_label.text="初速度 %.1f m/s" % value)
|
||||
speed_control.add_child(speed_slider)
|
||||
|
||||
func rebuild() -> void:
|
||||
super.rebuild()
|
||||
for child in world.get_children():
|
||||
if child is Label3D:child.hide()
|
||||
|
||||
func reset_simulation() -> void:
|
||||
super.reset_simulation()
|
||||
for tag in tags:tag.hide()
|
||||
|
||||
func initial_velocity(index: int) -> Vector3:
|
||||
var spec: Dictionary=spawn_specs[index]
|
||||
var direction: Vector3=lib.vector(spec.launchDirection)
|
||||
return direction.normalized()*speed_slider.value
|
||||
|
||||
func toggle_run() -> void:
|
||||
if started:return
|
||||
super.toggle_run()
|
||||
|
||||
func refresh_ui() -> void:
|
||||
if run_button==null:return
|
||||
run_button.disabled=started
|
||||
speed_slider.editable=not started
|
||||
|
||||
func initialize_level() -> void:
|
||||
apply_data(JSON.parse_string(FileAccess.get_file_as_string("res://playtest/showcase/data/showcase.json")))
|
||||
status="准备好,让两颗铁球一起出发。"
|
||||
refresh_ui()
|
||||
@@ -0,0 +1 @@
|
||||
uid://dva0vynyif7od
|
||||
Reference in New Issue
Block a user