godot-demo-projects/misc/pause/spinpause.tscn

83 lines
2.3 KiB
Plaintext

[gd_scene load_steps=4 format=2]
[ext_resource path="res://spinpause.gd" type="Script" id=1]
[sub_resource type="CubeMesh" id=1]
[sub_resource type="Animation" id=2]
length = 10.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("cube:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 10 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, -360, 0 ) ]
}
[node name="pause_scene" type="Spatial"]
script = ExtResource( 1 )
[node name="cube" type="MeshInstance" parent="."]
mesh = SubResource( 1 )
material/0 = null
[node name="camera" type="Camera" parent="."]
transform = Transform( 0.571594, 0.275303, -0.772974, 0, 0.942035, 0.335515, 0.820537, -0.191779, 0.538461, -5.59754, 2.75935, 4.01344 )
fov = 74.0
near = 0.1
[node name="anim" type="AnimationPlayer" parent="."]
autoplay = "spin"
anims/spin = SubResource( 2 )
[node name="spot" type="SpotLight" parent="."]
transform = Transform( 0.792992, 0.251051, -0.555101, 0, 0.911149, 0.412078, 0.609232, -0.326775, 0.722534, -3.05357, 1.80053, 3.64099 )
spot_range = 6.0
[node name="pause" type="Button" parent="."]
margin_left = 24.0
margin_top = 24.0
margin_right = 120.0
margin_bottom = 56.0
size_flags_horizontal = 2
size_flags_vertical = 2
text = "PAUSE!"
[node name="pause_popup" type="PopupPanel" parent="."]
pause_mode = 2
self_modulate = Color( 1, 1, 1, 0.7 )
margin_left = 185.0
margin_top = 72.0
margin_right = 638.0
margin_bottom = 433.0
size_flags_horizontal = 2
size_flags_vertical = 2
[node name="text" type="Label" parent="pause_popup"]
margin_left = 4.0
margin_top = 4.0
margin_right = 449.0
margin_bottom = 357.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "The game has been paused! Nodes are not processing anymore, but this popup can still process!"
autowrap = true
[node name="unpause" type="Button" parent="pause_popup"]
margin_left = 4.0
margin_top = 4.0
margin_right = 449.0
margin_bottom = 357.0
size_flags_horizontal = 2
size_flags_vertical = 2
text = "UN-PAUSE!"
[connection signal="pressed" from="pause" to="." method="_on_pause_pressed"]
[connection signal="pressed" from="pause_popup/unpause" to="." method="_on_unpause_pressed"]