[gd_scene load_steps=10 format=3 uid="uid://y083suj12rld"]

[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"]
[ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"]
[ext_resource type="Texture2D" uid="uid://dwb83f7uoweuy" path="res://graphics/Terrain (32x32).png" id="2_l22q1"]
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"]
[ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"]

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xg6qs"]
texture = ExtResource("2_l22q1")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:0/0/terrains_peering_bit/right_side = 0
0:0/0/terrains_peering_bit/bottom_right_corner = 0
0:0/0/terrains_peering_bit/bottom_side = 0
1:0/0 = 0
1:0/0/terrain_set = 0
1:0/0/terrain = 0
1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
1:0/0/physics_layer_0/angular_velocity = 0.0
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:0/0/terrains_peering_bit/right_side = 0
1:0/0/terrains_peering_bit/bottom_right_corner = 0
1:0/0/terrains_peering_bit/bottom_side = 0
1:0/0/terrains_peering_bit/bottom_left_corner = 0
1:0/0/terrains_peering_bit/left_side = 0
2:0/0 = 0
2:0/0/terrain_set = 0
2:0/0/terrain = 0
2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
2:0/0/physics_layer_0/angular_velocity = 0.0
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:0/0/terrains_peering_bit/bottom_side = 0
2:0/0/terrains_peering_bit/bottom_left_corner = 0
2:0/0/terrains_peering_bit/left_side = 0
4:0/0 = 0
4:0/0/terrain_set = 0
4:0/0/terrain = 0
4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
4:0/0/physics_layer_0/angular_velocity = 0.0
4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:0/0/terrains_peering_bit/bottom_side = 0
6:0/0 = 0
6:0/0/terrain_set = 0
6:0/0/terrain = 0
6:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
6:0/0/physics_layer_0/angular_velocity = 0.0
6:0/0/terrains_peering_bit/right_side = 0
6:0/0/terrains_peering_bit/bottom_side = 0
6:0/0/terrains_peering_bit/bottom_left_corner = 0
6:0/0/terrains_peering_bit/left_side = 0
6:0/0/terrains_peering_bit/top_left_corner = 0
6:0/0/terrains_peering_bit/top_side = 0
6:0/0/terrains_peering_bit/top_right_corner = 0
7:0/0 = 0
7:0/0/terrain_set = 0
7:0/0/terrain = 0
7:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
7:0/0/physics_layer_0/angular_velocity = 0.0
7:0/0/terrains_peering_bit/right_side = 0
7:0/0/terrains_peering_bit/bottom_right_corner = 0
7:0/0/terrains_peering_bit/bottom_side = 0
7:0/0/terrains_peering_bit/left_side = 0
7:0/0/terrains_peering_bit/top_left_corner = 0
7:0/0/terrains_peering_bit/top_side = 0
7:0/0/terrains_peering_bit/top_right_corner = 0
9:0/0 = 0
9:0/0/terrain_set = 0
9:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
9:0/0/physics_layer_0/angular_velocity = 0.0
10:0/0 = 0
10:0/0/terrain_set = 0
10:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
10:0/0/physics_layer_0/angular_velocity = 0.0
12:0/0 = 0
12:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
12:0/0/physics_layer_0/angular_velocity = 0.0
13:0/0 = 0
13:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
13:0/0/physics_layer_0/angular_velocity = 0.0
15:0/0 = 0
15:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
15:0/0/physics_layer_0/angular_velocity = 0.0
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 0
0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:1/0/physics_layer_0/angular_velocity = 0.0
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:1/0/terrains_peering_bit/right_side = 0
0:1/0/terrains_peering_bit/bottom_right_corner = 0
0:1/0/terrains_peering_bit/bottom_side = 0
0:1/0/terrains_peering_bit/top_side = 0
0:1/0/terrains_peering_bit/top_right_corner = 0
1:1/0 = 0
1:1/0/terrain_set = 0
1:1/0/terrain = 0
1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
1:1/0/physics_layer_0/angular_velocity = 0.0
1:1/0/terrains_peering_bit/right_side = 0
1:1/0/terrains_peering_bit/bottom_right_corner = 0
1:1/0/terrains_peering_bit/bottom_side = 0
1:1/0/terrains_peering_bit/bottom_left_corner = 0
1:1/0/terrains_peering_bit/left_side = 0
1:1/0/terrains_peering_bit/top_left_corner = 0
1:1/0/terrains_peering_bit/top_side = 0
1:1/0/terrains_peering_bit/top_right_corner = 0
2:1/0 = 0
2:1/0/terrain_set = 0
2:1/0/terrain = 0
2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
2:1/0/physics_layer_0/angular_velocity = 0.0
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:1/0/terrains_peering_bit/bottom_side = 0
2:1/0/terrains_peering_bit/bottom_left_corner = 0
2:1/0/terrains_peering_bit/left_side = 0
2:1/0/terrains_peering_bit/top_left_corner = 0
2:1/0/terrains_peering_bit/top_side = 0
4:1/0 = 0
4:1/0/terrain_set = 0
4:1/0/terrain = 0
4:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
4:1/0/physics_layer_0/angular_velocity = 0.0
4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:1/0/terrains_peering_bit/bottom_side = 0
4:1/0/terrains_peering_bit/top_side = 0
6:1/0 = 0
6:1/0/terrain_set = 0
6:1/0/terrain = 0
6:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
6:1/0/physics_layer_0/angular_velocity = 0.0
6:1/0/terrains_peering_bit/right_side = 0
6:1/0/terrains_peering_bit/bottom_right_corner = 0
6:1/0/terrains_peering_bit/bottom_side = 0
6:1/0/terrains_peering_bit/bottom_left_corner = 0
6:1/0/terrains_peering_bit/left_side = 0
6:1/0/terrains_peering_bit/top_left_corner = 0
6:1/0/terrains_peering_bit/top_side = 0
7:1/0 = 0
7:1/0/terrain_set = 0
7:1/0/terrain = 0
7:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
7:1/0/physics_layer_0/angular_velocity = 0.0
7:1/0/terrains_peering_bit/right_side = 0
7:1/0/terrains_peering_bit/bottom_right_corner = 0
7:1/0/terrains_peering_bit/bottom_side = 0
7:1/0/terrains_peering_bit/bottom_left_corner = 0
7:1/0/terrains_peering_bit/left_side = 0
7:1/0/terrains_peering_bit/top_side = 0
7:1/0/terrains_peering_bit/top_right_corner = 0
9:1/0 = 0
9:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
9:1/0/physics_layer_0/angular_velocity = 0.0
10:1/0 = 0
10:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
10:1/0/physics_layer_0/angular_velocity = 0.0
12:1/0 = 0
12:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
12:1/0/physics_layer_0/angular_velocity = 0.0
13:1/0 = 0
13:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
13:1/0/physics_layer_0/angular_velocity = 0.0
15:1/0 = 0
15:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
15:1/0/physics_layer_0/angular_velocity = 0.0
16:1/0 = 0
16:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
16:1/0/physics_layer_0/angular_velocity = 0.0
0:2/0 = 0
0:2/0/terrain_set = 0
0:2/0/terrain = 0
0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:2/0/physics_layer_0/angular_velocity = 0.0
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:2/0/terrains_peering_bit/right_side = 0
0:2/0/terrains_peering_bit/top_side = 0
0:2/0/terrains_peering_bit/top_right_corner = 0
1:2/0 = 0
1:2/0/terrain_set = 0
1:2/0/terrain = 0
1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
1:2/0/physics_layer_0/angular_velocity = 0.0
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:2/0/terrains_peering_bit/right_side = 0
1:2/0/terrains_peering_bit/left_side = 0
1:2/0/terrains_peering_bit/top_left_corner = 0
1:2/0/terrains_peering_bit/top_side = 0
1:2/0/terrains_peering_bit/top_right_corner = 0
2:2/0 = 0
2:2/0/terrain_set = 0
2:2/0/terrain = 0
2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
2:2/0/physics_layer_0/angular_velocity = 0.0
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:2/0/terrains_peering_bit/left_side = 0
2:2/0/terrains_peering_bit/top_left_corner = 0
2:2/0/terrains_peering_bit/top_side = 0
4:2/0 = 0
4:2/0/terrain_set = 0
4:2/0/terrain = 0
4:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
4:2/0/physics_layer_0/angular_velocity = 0.0
4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:2/0/terrains_peering_bit/top_side = 0
6:3/0 = 0
6:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
6:3/0/physics_layer_0/angular_velocity = 0.0
6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
7:3/0 = 0
7:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
7:3/0/physics_layer_0/angular_velocity = 0.0
7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
9:3/0 = 0
9:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
9:3/0/physics_layer_0/angular_velocity = 0.0
9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
10:3/0 = 0
10:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
10:3/0/physics_layer_0/angular_velocity = 0.0
10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
12:3/0 = 0
12:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
12:3/0/physics_layer_0/angular_velocity = 0.0
12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
13:3/0 = 0
13:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
13:3/0/physics_layer_0/angular_velocity = 0.0
13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
15:3/0 = 0
15:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
15:3/0/physics_layer_0/angular_velocity = 0.0
15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
16:3/0 = 0
16:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
16:3/0/physics_layer_0/angular_velocity = 0.0
16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:4/0 = 0
0:4/0/terrain_set = 0
0:4/0/terrain = 0
0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:4/0/physics_layer_0/angular_velocity = 0.0
0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:4/0/terrains_peering_bit/right_side = 0
1:4/0 = 0
1:4/0/terrain_set = 0
1:4/0/terrain = 0
1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
1:4/0/physics_layer_0/angular_velocity = 0.0
1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:4/0/terrains_peering_bit/right_side = 0
1:4/0/terrains_peering_bit/left_side = 0
2:4/0 = 0
2:4/0/terrain_set = 0
2:4/0/terrain = 0
2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
2:4/0/physics_layer_0/angular_velocity = 0.0
2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:4/0/terrains_peering_bit/left_side = 0
4:4/0 = 0
4:4/0/terrain_set = 0
4:4/0/terrain = 0
4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
4:4/0/physics_layer_0/angular_velocity = 0.0
4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
6:4/0 = 0
6:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
6:4/0/physics_layer_0/angular_velocity = 0.0
6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
7:4/0 = 0
7:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
7:4/0/physics_layer_0/angular_velocity = 0.0
7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
9:4/0 = 0
9:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
9:4/0/physics_layer_0/angular_velocity = 0.0
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
10:4/0 = 0
10:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
10:4/0/physics_layer_0/angular_velocity = 0.0
10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
12:4/0 = 0
12:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
12:4/0/physics_layer_0/angular_velocity = 0.0
12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
13:4/0 = 0
13:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
13:4/0/physics_layer_0/angular_velocity = 0.0
13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
15:4/0 = 0
15:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
15:4/0/physics_layer_0/angular_velocity = 0.0
15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
16:4/0 = 0
16:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
16:4/0/physics_layer_0/angular_velocity = 0.0
16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)

[sub_resource type="TileSet" id="TileSet_47g5u"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "ground"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
sources/0 = SubResource("TileSetAtlasSource_xg6qs")

[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_xkyim"]

[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
radius = 60.2993

[node name="Game" type="Node2D"]
script = ExtResource("1_77wyw")

[node name="TileMap" type="TileMap" parent="."]
tile_set = SubResource("TileSet_47g5u")
format = 2
layer_0/tile_data = PackedInt32Array(262141, 262144, 2, 262142, 65536, 4, 262143, 65536, 4, 196608, 65536, 4, 196609, 65536, 4, 196610, 131072, 4, 196613, 262144, 4, 196605, 262144, 1, 131069, 262144, 1, 65533, 65536, 4, 65532, 262144, 2, -4, 262144, 0, 65534, 65536, 4, 65535, 131072, 4, 4, 131072, 2, 3, 0, 2, -65533, 0, 0, -65532, 131072, 0)

[node name="level" type="Node2D" parent="."]

[node name="StaticBody2D" type="StaticBody2D" parent="level"]
position = Vector2(48, 145)
metadata/_edit_group_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D"]
shape = SubResource("WorldBoundaryShape2D_xkyim")

[node name="CharacterBody2D" parent="." groups=["player"] instance=ExtResource("2_64ccm")]
position = Vector2(41, 43)
PUSH_FORCE = 550

[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"]

[node name="AreaTrigger" type="Area2D" parent="."]
position = Vector2(274, 22)
script = ExtResource("2_nfj1w")
metadata/_edit_group_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="AreaTrigger"]
shape = SubResource("CircleShape2D_x8qck")
debug_color = Color(0.556863, 0.415686, 0.964706, 0.419608)

[node name="crates" type="Node" parent="."]

[node name="crate1" parent="crates" instance=ExtResource("5_u8rgi")]
position = Vector2(-22, -30)

[connection signal="areatrigger" from="AreaTrigger" to="." method="_on_area_2d_areatrigger"]
[connection signal="body_entered" from="AreaTrigger" to="AreaTrigger" method="_on_body_entered"]
