mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 05:20:06 +01:00
110 lines
2.9 KiB
Plaintext
110 lines
2.9 KiB
Plaintext
[gd_scene load_steps=8 format=3 uid="uid://34i0qxyhkmnt"]
|
|
|
|
[ext_resource type="Script" uid="uid://cxpgygel7r0ih" path="res://pause_button.gd" id="1"]
|
|
[ext_resource type="Script" uid="uid://8a5fca3pnriq" path="res://process_mode.gd" id="2_0dpmq"]
|
|
|
|
[sub_resource type="BoxMesh" id="1"]
|
|
size = Vector3(1.5, 1.5, 1.5)
|
|
|
|
[sub_resource type="Animation" id="2"]
|
|
length = 10.0
|
|
loop_mode = 1
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Cube:rotation")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0, 10),
|
|
"transitions": PackedFloat32Array(1, 1),
|
|
"update": 0,
|
|
"values": [Vector3(0, 0, 0), Vector3(0, -6.28319, 0)]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5vmwp"]
|
|
_data = {
|
|
&"spin": SubResource("2")
|
|
}
|
|
|
|
[sub_resource type="InputEventAction" id="InputEventAction_6y126"]
|
|
action = &"toggle_pause"
|
|
|
|
[sub_resource type="Shortcut" id="Shortcut_mmc83"]
|
|
events = [SubResource("InputEventAction_6y126")]
|
|
|
|
[node name="PauseScene" type="Node3D"]
|
|
|
|
[node name="Cube" type="MeshInstance3D" parent="."]
|
|
mesh = SubResource("1")
|
|
|
|
[node name="Camera3D" type="Camera3D" parent="."]
|
|
transform = Transform3D(0.707107, -0.241845, 0.664463, 0, 0.939693, 0.34202, -0.707107, -0.241845, 0.664463, 2, 1, 2)
|
|
fov = 74.0
|
|
near = 0.1
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
&"": SubResource("AnimationLibrary_5vmwp")
|
|
}
|
|
autoplay = "spin"
|
|
|
|
[node name="SpotLight3D" type="SpotLight3D" parent="."]
|
|
transform = Transform3D(0.707107, -0.353554, 0.612373, 0, 0.866026, 0.5, -0.707107, -0.353554, 0.612373, 2, 2, 2)
|
|
spot_range = 6.0
|
|
|
|
[node name="PauseButton" type="Button" parent="."]
|
|
process_mode = 3
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -125.0
|
|
offset_top = 150.0
|
|
offset_right = 125.0
|
|
offset_bottom = 200.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
toggle_mode = true
|
|
shortcut = SubResource("Shortcut_mmc83")
|
|
text = "Pause"
|
|
script = ExtResource("1")
|
|
|
|
[node name="ProcessMode" type="HBoxContainer" parent="."]
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -185.502
|
|
offset_top = -250.0
|
|
offset_right = 185.503
|
|
offset_bottom = -210.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="Label" type="Label" parent="ProcessMode"]
|
|
layout_mode = 2
|
|
text = "Cube Process Mode"
|
|
|
|
[node name="OptionButton" type="OptionButton" parent="ProcessMode"]
|
|
process_mode = 3
|
|
layout_mode = 2
|
|
selected = 0
|
|
item_count = 5
|
|
popup/item_0/text = "Inherit"
|
|
popup/item_0/id = 0
|
|
popup/item_1/text = "Pausable"
|
|
popup/item_1/id = 1
|
|
popup/item_2/text = "When Paused"
|
|
popup/item_2/id = 2
|
|
popup/item_3/text = "Always"
|
|
popup/item_3/id = 3
|
|
popup/item_4/text = "Disabled (Never)"
|
|
popup/item_4/id = 4
|
|
script = ExtResource("2_0dpmq")
|
|
|
|
[connection signal="item_selected" from="ProcessMode/OptionButton" to="ProcessMode/OptionButton" method="_on_option_button_item_selected"]
|