diff --git a/game.gd b/game.gd index 7ef3cb0..97f05b3 100644 --- a/game.gd +++ b/game.gd @@ -3,10 +3,8 @@ extends Node2D @onready var player := $Player @onready var dialogues = $GUI/Dialogues -func _ready(): - var window: Window = get_tree().root - var game_size = window.content_scale_size +func _ready(): for chest in get_tree().get_nodes_in_group("chests"): chest.connect("chest_opened", func(item_name): @@ -39,7 +37,6 @@ func gameover(): music_fadeout.tween_property($Music, "volume_db", $Music.volume_db - 16, .7) music_fadeout.tween_property($Music, "pitch_scale", $Music.pitch_scale - .2, 3) $GameOverLayer.show() - # TODO: show gameover screen func _on_dialogues_dialogue_started(): diff --git a/game.tscn b/game.tscn index 80ea1b9..954a9c7 100644 --- a/game.tscn +++ b/game.tscn @@ -101,18 +101,23 @@ texture = ExtResource( "4_rp35f" ) 0:24/0 = 0 0:24/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:24/0/physics_layer_0/angular_velocity = 0.0 +0:24/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 0:26/0 = 0 0:26/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:26/0/physics_layer_0/angular_velocity = 0.0 +0:26/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 0:27/0 = 0 0:27/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:27/0/physics_layer_0/angular_velocity = 0.0 +0:27/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 0:28/0 = 0 0:28/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:28/0/physics_layer_0/angular_velocity = 0.0 +0:28/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 0:29/0 = 0 0:29/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:29/0/physics_layer_0/angular_velocity = 0.0 +0:29/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 1:0/0 = 0 1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 1:0/0/physics_layer_0/angular_velocity = 0.0 @@ -173,9 +178,11 @@ texture = ExtResource( "4_rp35f" ) 1:28/0 = 0 1:28/0/physics_layer_0/linear_velocity = Vector2(0, 0) 1:28/0/physics_layer_0/angular_velocity = 0.0 +1:28/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 1:29/0 = 0 1:29/0/physics_layer_0/linear_velocity = Vector2(0, 0) 1:29/0/physics_layer_0/angular_velocity = 0.0 +1:29/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 2:0/0 = 0 2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 2:0/0/physics_layer_0/angular_velocity = 0.0 @@ -228,6 +235,7 @@ texture = ExtResource( "4_rp35f" ) 2:24/0 = 0 2:24/0/physics_layer_0/linear_velocity = Vector2(0, 0) 2:24/0/physics_layer_0/angular_velocity = 0.0 +2:24/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 3:0/0 = 0 3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 3:0/0/physics_layer_0/angular_velocity = 0.0 @@ -336,9 +344,11 @@ texture = ExtResource( "4_rp35f" ) 4:28/0 = 0 4:28/0/physics_layer_0/linear_velocity = Vector2(0, 0) 4:28/0/physics_layer_0/angular_velocity = 0.0 +4:28/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 4:29/0 = 0 4:29/0/physics_layer_0/linear_velocity = Vector2(0, 0) 4:29/0/physics_layer_0/angular_velocity = 0.0 +4:29/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 5:0/0 = 0 5:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 5:0/0/physics_layer_0/angular_velocity = 0.0 @@ -415,18 +425,23 @@ texture = ExtResource( "4_rp35f" ) 5:24/0 = 0 5:24/0/physics_layer_0/linear_velocity = Vector2(0, 0) 5:24/0/physics_layer_0/angular_velocity = 0.0 +5:24/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 5:26/0 = 0 5:26/0/physics_layer_0/linear_velocity = Vector2(0, 0) 5:26/0/physics_layer_0/angular_velocity = 0.0 +5:26/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 5:27/0 = 0 5:27/0/physics_layer_0/linear_velocity = Vector2(0, 0) 5:27/0/physics_layer_0/angular_velocity = 0.0 +5:27/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 5:28/0 = 0 5:28/0/physics_layer_0/linear_velocity = Vector2(0, 0) 5:28/0/physics_layer_0/angular_velocity = 0.0 +5:28/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 5:29/0 = 0 5:29/0/physics_layer_0/linear_velocity = Vector2(0, 0) 5:29/0/physics_layer_0/angular_velocity = 0.0 +5:29/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 6:5/0 = 0 6:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) 6:5/0/physics_layer_0/angular_velocity = 0.0 @@ -814,9 +829,11 @@ texture = ExtResource( "4_rp35f" ) 12:8/0 = 0 12:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) 12:8/0/physics_layer_0/angular_velocity = 0.0 +12:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 12:9/0 = 0 12:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) 12:9/0/physics_layer_0/angular_velocity = 0.0 +12:9/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 12:11/0 = 0 12:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) 12:11/0/physics_layer_0/angular_velocity = 0.0 @@ -901,9 +918,11 @@ texture = ExtResource( "4_rp35f" ) 13:8/0 = 0 13:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) 13:8/0/physics_layer_0/angular_velocity = 0.0 +13:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 13:9/0 = 0 13:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) 13:9/0/physics_layer_0/angular_velocity = 0.0 +13:9/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 13:12/0 = 0 13:12/0/physics_layer_0/linear_velocity = Vector2(0, 0) 13:12/0/physics_layer_0/angular_velocity = 0.0 @@ -975,6 +994,7 @@ texture = ExtResource( "4_rp35f" ) 14:6/0/y_sort_origin = 14 14:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) 14:6/0/physics_layer_0/angular_velocity = 0.0 +14:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-11.5, -8, 13, -8, 12, 26.5, -10.5, 26) 14:11/0 = 0 14:11/0/physics_layer_0/linear_velocity = Vector2(0, 0) 14:11/0/physics_layer_0/angular_velocity = 0.0 @@ -1312,6 +1332,7 @@ texture = ExtResource( "4_rp35f" ) 18:12/0 = 0 18:12/0/physics_layer_0/linear_velocity = Vector2(0, 0) 18:12/0/physics_layer_0/angular_velocity = 0.0 +18:12/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 18:14/0 = 0 18:14/0/physics_layer_0/linear_velocity = Vector2(0, 0) 18:14/0/physics_layer_0/angular_velocity = 0.0 diff --git a/player/player.gd b/player/player.gd index efb7c41..6dbac81 100644 --- a/player/player.gd +++ b/player/player.gd @@ -141,3 +141,5 @@ func on_state_changed(new_state, prev_state): func handle_item_received(item): if item == "sword": has_sword = true + else: + print(item + " not supported.")