Skip to content

Commit

Permalink
Fix tileset collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
davcri committed Apr 27, 2022
1 parent a0dc33a commit 791f986
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
5 changes: 1 addition & 4 deletions game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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():
Expand Down
21 changes: 21 additions & 0 deletions game.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions player/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

0 comments on commit 791f986

Please sign in to comment.