Skip to content

Commit 67a490a

Browse files
committed
Improve pause demo
1 parent f07c709 commit 67a490a

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

misc/pause/pause_button.gd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
extends Button
22

33
func _ready():
4-
#This ensures that this Node won't be paused, allowing it to
5-
#process even when the SceneTree is paused. Without that it would
6-
#not be able to unpause the game. Note that you can set this through
7-
#the inspector as well
4+
# This ensures that this Node won't be paused, allowing it to
5+
# process even when the SceneTree is paused. Without that it would
6+
# not be able to unpause the game. Note that you can set this through
7+
# the inspector as well.
88
pause_mode = Node.PAUSE_MODE_PROCESS
99

1010

1111
func _toggled(button_pressed):
12-
#Pause or unpause the SceneTree based on whether the button is
13-
#toggled on or off
12+
# Pause or unpause the SceneTree based on whether the button is
13+
# toggled on or off.
1414
get_tree().paused = button_pressed
1515
if button_pressed:
1616
text = "Unpause"

misc/pause/spinpause.gd

Lines changed: 0 additions & 10 deletions
This file was deleted.

misc/pause/spinpause.tscn

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
length = 10.0
99
loop = true
1010
tracks/0/type = "value"
11-
tracks/0/path = NodePath("cube:rotation_degrees")
11+
tracks/0/path = NodePath("Cube:rotation_degrees")
1212
tracks/0/interp = 1
1313
tracks/0/loop_wrap = true
1414
tracks/0/imported = false
@@ -20,26 +20,26 @@ tracks/0/keys = {
2020
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, -360, 0 ) ]
2121
}
2222

23-
[node name="pause_scene" type="Spatial"]
23+
[node name="PauseScene" type="Spatial"]
2424

25-
[node name="cube" type="MeshInstance" parent="."]
25+
[node name="Cube" type="MeshInstance" parent="."]
2626
mesh = SubResource( 1 )
2727
material/0 = null
2828

29-
[node name="camera" type="Camera" parent="."]
29+
[node name="Camera" type="Camera" parent="."]
3030
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 )
3131
fov = 74.0
3232
near = 0.1
3333

34-
[node name="anim" type="AnimationPlayer" parent="."]
34+
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
3535
autoplay = "spin"
3636
anims/spin = SubResource( 2 )
3737

38-
[node name="spot" type="SpotLight" parent="."]
38+
[node name="SpotLight" type="SpotLight" parent="."]
3939
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 )
4040
spot_range = 6.0
4141

42-
[node name="pause_button" type="Button" parent="."]
42+
[node name="PauseButton" type="Button" parent="."]
4343
pause_mode = 2
4444
anchor_left = 0.5
4545
anchor_top = 0.5

0 commit comments

Comments
 (0)