feat(val-blog): add 2026-04-30 dream journey post
This commit is contained in:
@@ -0,0 +1,179 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://b2kllwl6juoxs"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/apartment.gd" id="1_apartment"]
|
||||
[ext_resource type="PackedScene" uid="uid://val123456789" path="res://scenes/val.tscn" id="2_val"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_320x240"]
|
||||
size = Vector2(320, 240)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_96x48"]
|
||||
size = Vector2(96, 48)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_48x80"]
|
||||
size = Vector2(48, 80)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_96x64"]
|
||||
size = Vector2(96, 64)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_80x64"]
|
||||
size = Vector2(80, 64)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_32x32"]
|
||||
size = Vector2(32, 32)
|
||||
|
||||
[node name="Apartment" type="Node2D"]
|
||||
script = ExtResource("1_apartment")
|
||||
|
||||
[node name="Floor" type="ColorRect" parent="."]
|
||||
offset_left = 0.0
|
||||
offset_top = 0.0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 720.0
|
||||
color = Color(0.9, 0.85, 0.8, 1)
|
||||
|
||||
[node name="Rooms" type="Node2D" parent="."]
|
||||
|
||||
[node name="LivingRoom" type="Area2D" parent="Rooms"]
|
||||
position = Vector2(320, 240)
|
||||
metadata/room_name = "客厅"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rooms/LivingRoom"]
|
||||
shape = SubResource("RectangleShape2D_320x240")
|
||||
|
||||
[node name="RoomLabel" type="Label" parent="Rooms/LivingRoom"]
|
||||
offset_left = -40.0
|
||||
offset_top = -100.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = -80.0
|
||||
text = "客厅"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Kitchen" type="Area2D" parent="Rooms"]
|
||||
position = Vector2(320, 480)
|
||||
metadata/room_name = "厨房"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rooms/Kitchen"]
|
||||
shape = SubResource("RectangleShape2D_320x240")
|
||||
|
||||
[node name="RoomLabel" type="Label" parent="Rooms/Kitchen"]
|
||||
offset_left = -40.0
|
||||
offset_top = -100.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = -80.0
|
||||
text = "厨房"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Bedroom" type="Area2D" parent="Rooms"]
|
||||
position = Vector2(800, 240)
|
||||
metadata/room_name = "卧室"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rooms/Bedroom"]
|
||||
shape = SubResource("RectangleShape2D_320x240")
|
||||
|
||||
[node name="RoomLabel" type="Label" parent="Rooms/Bedroom"]
|
||||
offset_left = -40.0
|
||||
offset_top = -100.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = -80.0
|
||||
text = "卧室"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Furniture" type="Node2D" parent="."]
|
||||
|
||||
[node name="Sofa" type="Area2D" parent="Furniture"]
|
||||
position = Vector2(280, 200)
|
||||
metadata/furniture_name = "沙发"
|
||||
metadata/interaction = "坐"
|
||||
|
||||
[node name="FurnitureRect" type="ColorRect" parent="Furniture/Sofa"]
|
||||
offset_left = -48.0
|
||||
offset_top = -24.0
|
||||
offset_right = 48.0
|
||||
offset_bottom = 24.0
|
||||
color = Color(0.55, 0.27, 0.07, 1)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Furniture/Sofa"]
|
||||
shape = SubResource("RectangleShape2D_96x48")
|
||||
|
||||
[node name="FurnitureLabel" type="Label" parent="Furniture/Sofa"]
|
||||
offset_left = -20.0
|
||||
offset_top = -35.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = -15.0
|
||||
text = "沙发"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Fridge" type="Area2D" parent="Furniture"]
|
||||
position = Vector2(280, 440)
|
||||
metadata/furniture_name = "冰箱"
|
||||
metadata/interaction = "打开"
|
||||
|
||||
[node name="FurnitureRect" type="ColorRect" parent="Furniture/Fridge"]
|
||||
offset_left = -24.0
|
||||
offset_top = -40.0
|
||||
offset_right = 24.0
|
||||
offset_bottom = 40.0
|
||||
color = Color(0.9, 0.9, 0.9, 1)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Furniture/Fridge"]
|
||||
shape = SubResource("RectangleShape2D_48x80")
|
||||
|
||||
[node name="FurnitureLabel" type="Label" parent="Furniture/Fridge"]
|
||||
offset_left = -20.0
|
||||
offset_top = -50.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = -30.0
|
||||
text = "冰箱"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Bed" type="Area2D" parent="Furniture"]
|
||||
position = Vector2(720, 200)
|
||||
metadata/furniture_name = "床"
|
||||
metadata/interaction = "睡觉"
|
||||
|
||||
[node name="FurnitureRect" type="ColorRect" parent="Furniture/Bed"]
|
||||
offset_left = -48.0
|
||||
offset_top = -32.0
|
||||
offset_right = 48.0
|
||||
offset_bottom = 32.0
|
||||
color = Color(0.25, 0.41, 0.88, 1)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Furniture/Bed"]
|
||||
shape = SubResource("RectangleShape2D_96x64")
|
||||
|
||||
[node name="FurnitureLabel" type="Label" parent="Furniture/Bed"]
|
||||
offset_left = -20.0
|
||||
offset_top = -45.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = -25.0
|
||||
text = "床"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Desk" type="Area2D" parent="Furniture"]
|
||||
position = Vector2(880, 200)
|
||||
metadata/furniture_name = "书桌"
|
||||
metadata/interaction = "工作"
|
||||
|
||||
[node name="FurnitureRect" type="ColorRect" parent="Furniture/Desk"]
|
||||
offset_left = -40.0
|
||||
offset_top = -32.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 32.0
|
||||
color = Color(0.55, 0.35, 0.15, 1)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Furniture/Desk"]
|
||||
shape = SubResource("RectangleShape2D_80x64")
|
||||
|
||||
[node name="FurnitureLabel" type="Label" parent="Furniture/Desk"]
|
||||
offset_left = -20.0
|
||||
offset_top = -45.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = -25.0
|
||||
text = "书桌"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Val" parent="." instance=ExtResource("2_val")]
|
||||
position = Vector2(400, 300)
|
||||
|
||||
[node name="Navigation" type="NavigationRegion2D" parent="."]
|
||||
polygons = [PackedVector2Array(100, 100, 540, 100, 540, 380, 100, 380), PackedVector2Array(100, 420, 540, 420, 540, 700, 100, 700), PackedVector2Array(580, 100, 1020, 100, 1020, 380, 580, 380)]
|
||||
@@ -0,0 +1,70 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c8yvxg3ulq3a"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/main.gd" id="0_main"]
|
||||
[ext_resource type="Script" path="res://scripts/bridge_client.gd" id="0_bridge"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2kllwl6juoxs" path="res://scenes/apartment.tscn" id="1_abc123"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("0_main")
|
||||
|
||||
[node name="BridgeClient" type="Node" parent="."]
|
||||
script = ExtResource("0_bridge")
|
||||
|
||||
[node name="Apartment" parent="." instance=ExtResource("1_abc123")]
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Panel" type="Panel" parent="UI"]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -300.0
|
||||
offset_bottom = 200.0
|
||||
grow_horizontal = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="UI/Panel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 10.0
|
||||
offset_top = 10.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = -10.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Label" type="Label" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "AgentLiving - 状态监控"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AgentState" type="Label" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Val: idle"
|
||||
|
||||
[node name="Location" type="Label" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "位置: 客厅"
|
||||
|
||||
[node name="Energy" type="Label" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "精力: 80%"
|
||||
|
||||
[node name="Mood" type="Label" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "心情: 开心"
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CommandInput" type="LineEdit" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "输入指令..."
|
||||
|
||||
[node name="SendButton" type="Button" parent="UI/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "发送"
|
||||
@@ -0,0 +1,96 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://val123456789"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/val.gd" id="1_val"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_val"]
|
||||
animations = [{
|
||||
"frames": [],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 1.0
|
||||
}, {
|
||||
"frames": [],
|
||||
"loop": true,
|
||||
"name": &"walk",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [],
|
||||
"loop": true,
|
||||
"name": &"interact",
|
||||
"speed": 1.0
|
||||
}, {
|
||||
"frames": [],
|
||||
"loop": true,
|
||||
"name": &"think",
|
||||
"speed": 2.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_16"]
|
||||
radius = 16.0
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_body"]
|
||||
size = Vector2(24, 32)
|
||||
|
||||
[node name="Val" type="CharacterBody2D"]
|
||||
script = ExtResource("1_val")
|
||||
|
||||
[node name="BodyPlaceholder" type="ColorRect" parent="."]
|
||||
offset_left = -12.0
|
||||
offset_top = -32.0
|
||||
offset_right = 12.0
|
||||
offset_bottom = 0.0
|
||||
color = Color(0.36, 0.61, 0.84, 1)
|
||||
|
||||
[node name="HeadPlaceholder" type="ColorRect" parent="."]
|
||||
offset_left = -10.0
|
||||
offset_top = -52.0
|
||||
offset_right = 10.0
|
||||
offset_bottom = -32.0
|
||||
color = Color(0.36, 0.61, 0.84, 1)
|
||||
|
||||
[node name="EyeLeft" type="ColorRect" parent="."]
|
||||
offset_left = -6.0
|
||||
offset_top = -48.0
|
||||
offset_right = -2.0
|
||||
offset_bottom = -44.0
|
||||
color = Color(1, 1, 1, 1)
|
||||
|
||||
[node name="EyeRight" type="ColorRect" parent="."]
|
||||
offset_left = 2.0
|
||||
offset_top = -48.0
|
||||
offset_right = 6.0
|
||||
offset_bottom = -44.0
|
||||
color = Color(1, 1, 1, 1)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
shape = SubResource("RectangleShape2D_body")
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||
path_desired_distance = 10.0
|
||||
navigation_layers = 1
|
||||
|
||||
[node name="ThoughtBubble" type="Label" parent="."]
|
||||
offset_left = -60.0
|
||||
offset_top = -70.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = -40.0
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "..."
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="StateIndicator" type="Label" parent="."]
|
||||
offset_left = -30.0
|
||||
offset_top = 4.0
|
||||
offset_right = 30.0
|
||||
offset_bottom = 24.0
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "idle"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="InteractionTimer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
[node name="ThinkTimer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
Reference in New Issue
Block a user