aboutsummaryrefslogtreecommitdiffstats
path: root/godot
diff options
context:
space:
mode:
authorLibravatar cel <cel@blos.sm>2022-07-17 02:56:58 +0100
committerLibravatar cel <cel@blos.sm>2022-07-17 02:56:58 +0100
commit5d5d662a99a512e2718aae4a4a84f050bc1d411f (patch)
treee0c4dde0528ac8318f0775c3dac511e609a72826 /godot
parent45c8787154fe7384c9c1faa2ab7c003b995393ca (diff)
parent16f5d5aaacdd1a1420bba8d6600942520d85cb8c (diff)
download2022-5d5d662a99a512e2718aae4a4a84f050bc1d411f.tar.gz
2022-5d5d662a99a512e2718aae4a4a84f050bc1d411f.tar.bz2
2022-5d5d662a99a512e2718aae4a4a84f050bc1d411f.zip
merged
Diffstat (limited to 'godot')
-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"]