aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--godot/scenes/Die.gd6
-rw-r--r--godot/scenes/Game.gd1
-rw-r--r--godot/scenes/levels/GoalTriggerZone.tscn3
-rw-r--r--godot/scenes/levels/test_scene_movement/TestSceneMovement.tscn2
-rw-r--r--godot/scenes/objects/GoalTriggerBox.gd (renamed from godot/scripts/GoalTriggerBox.gd)2
-rw-r--r--godot/scenes/objects/GoalZone.tscn13
6 files changed, 24 insertions, 3 deletions
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd
index 21a408e..7d07a6f 100644
--- a/godot/scenes/Die.gd
+++ b/godot/scenes/Die.gd
@@ -32,8 +32,14 @@ func _ready():
mat = get_physics_material_override()
previous_bounciness = mat.get_bounce()
+
func _input(event):
+ if _game.is_post_game():
+ if event is InputEventMouseButton || event is InputEventKey:
+ _game.next_level()
+ return
+
if event is InputEventKey:
if event.scancode == KEY_TAB:
if event.is_pressed():
diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd
index f24219e..8b86263 100644
--- a/godot/scenes/Game.gd
+++ b/godot/scenes/Game.gd
@@ -27,6 +27,7 @@ func _process(delta):
get_tree().paused = true
$PausePopup.show()
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
+ close_scoreboard()
diff --git a/godot/scenes/levels/GoalTriggerZone.tscn b/godot/scenes/levels/GoalTriggerZone.tscn
index 861db4d..54cdfe1 100644
--- a/godot/scenes/levels/GoalTriggerZone.tscn
+++ b/godot/scenes/levels/GoalTriggerZone.tscn
@@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=2]
-[ext_resource path="res://scripts/GoalTriggerBox.gd" type="Script" id=1]
+[ext_resource path="res://scenes/objects/GoalTriggerBox.gd" type="Script" id=1]
+
[sub_resource type="BoxShape" id=1]
diff --git a/godot/scenes/levels/test_scene_movement/TestSceneMovement.tscn b/godot/scenes/levels/test_scene_movement/TestSceneMovement.tscn
index dc25498..1350a10 100644
--- a/godot/scenes/levels/test_scene_movement/TestSceneMovement.tscn
+++ b/godot/scenes/levels/test_scene_movement/TestSceneMovement.tscn
@@ -28,4 +28,4 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 40, -1, -20 )
transform = Transform( 0.766044, 0, 0.642788, 0, 2, 0, -0.642788, 0, 0.766044, 19.47, 0, -14 )
[node name="Die" parent="." instance=ExtResource( 3 )]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.759363, 4.18965, -3.60846 )
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.50879, 0 )
diff --git a/godot/scripts/GoalTriggerBox.gd b/godot/scenes/objects/GoalTriggerBox.gd
index 6e1034b..9659520 100644
--- a/godot/scripts/GoalTriggerBox.gd
+++ b/godot/scenes/objects/GoalTriggerBox.gd
@@ -13,7 +13,7 @@ func _ready():
# pass
-func _on_Area2_body_entered(body: RigidBody):
+func _on_Area_body_entered(body: RigidBody):
# return when body is not a rigidbody
if body == null:
return
diff --git a/godot/scenes/objects/GoalZone.tscn b/godot/scenes/objects/GoalZone.tscn
new file mode 100644
index 0000000..79b8624
--- /dev/null
+++ b/godot/scenes/objects/GoalZone.tscn
@@ -0,0 +1,13 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://scenes/objects/GoalTriggerBox.gd" type="Script" id=1]
+
+[sub_resource type="BoxShape" id=1]
+
+[node name="GoalZone" type="Area"]
+script = ExtResource( 1 )
+
+[node name="CollisionShape" type="CollisionShape" parent="."]
+shape = SubResource( 1 )
+
+[connection signal="body_entered" from="." to="." method="_on_Area_body_entered"]