enemies, multilevels
This commit is contained in:
parent
f7c4c4b3ca
commit
ae5d43d74e
@ -1,11 +1,11 @@
|
|||||||
[gd_scene format=4 uid="uid://bcisk0tho1stb"]
|
[gd_scene format=4 uid="uid://bcisk0tho1stb"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://ctdwfmqkny8rc" path="res://Scripts/game controller.gd" id="1_qxrlw"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bsroh4vsjwblh" path="res://Scenes/crate.tscn" id="2_wowpa"]
|
[ext_resource type="PackedScene" uid="uid://bsroh4vsjwblh" path="res://Scenes/crate.tscn" id="2_wowpa"]
|
||||||
[ext_resource type="Texture2D" uid="uid://q4k62sp2sa6y" path="res://assets/graphics/Enviroments/Terrain (32x32).png" id="3_1l0tm"]
|
[ext_resource type="Texture2D" uid="uid://q4k62sp2sa6y" path="res://assets/graphics/Enviroments/Terrain (32x32).png" id="3_1l0tm"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dmk1mp1hqm62b" path="res://Scenes/player.tscn" id="3_i6g32"]
|
[ext_resource type="PackedScene" uid="uid://dmk1mp1hqm62b" path="res://Scenes/player.tscn" id="3_i6g32"]
|
||||||
[ext_resource type="Script" uid="uid://kb3v21msvi17" path="res://Scripts/trigger.gd" id="3_wrm1d"]
|
[ext_resource type="Script" uid="uid://kb3v21msvi17" path="res://Scripts/trigger.gd" id="3_wrm1d"]
|
||||||
[ext_resource type="Script" uid="uid://qhll446powxt" path="res://Scripts/scene_manager.gd" id="6_1l0tm"]
|
[ext_resource type="Script" uid="uid://qhll446powxt" path="res://Scripts/scene_manager.gd" id="6_1l0tm"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dkp7dy7npof2g" path="res://Scenes/slime.tscn" id="6_i6g32"]
|
||||||
|
|
||||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
|
||||||
texture = ExtResource("3_1l0tm")
|
texture = ExtResource("3_1l0tm")
|
||||||
@ -13,6 +13,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
0:0/0 = 0
|
0:0/0 = 0
|
||||||
0:0/0/terrain_set = 0
|
0:0/0/terrain_set = 0
|
||||||
0:0/0/terrain = 0
|
0:0/0/terrain = 0
|
||||||
|
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -4.4608307, -16, -4.1422005, 16, -16, 16)
|
||||||
0:0/0/terrains_peering_bit/right_side = 0
|
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_right_corner = 0
|
||||||
0:0/0/terrains_peering_bit/bottom_side = 0
|
0:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
@ -27,12 +28,14 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
2:0/0 = 0
|
2:0/0 = 0
|
||||||
2:0/0/terrain_set = 0
|
2:0/0/terrain_set = 0
|
||||||
2:0/0/terrain = 0
|
2:0/0/terrain = 0
|
||||||
|
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.603031, -16, 16, -16, 16, 16, 8.603031, 16, 8.284401, 16)
|
||||||
2:0/0/terrains_peering_bit/bottom_side = 0
|
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/bottom_left_corner = 0
|
||||||
2:0/0/terrains_peering_bit/left_side = 0
|
2:0/0/terrains_peering_bit/left_side = 0
|
||||||
4:0/0 = 0
|
4:0/0 = 0
|
||||||
4:0/0/terrain_set = 0
|
4:0/0/terrain_set = 0
|
||||||
4:0/0/terrain = 0
|
4:0/0/terrain = 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
|
4:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
6:0/0 = 0
|
6:0/0 = 0
|
||||||
6:0/0/terrain_set = 0
|
6:0/0/terrain_set = 0
|
||||||
@ -97,6 +100,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
0:1/0 = 0
|
0:1/0 = 0
|
||||||
0:1/0/terrain_set = 0
|
0:1/0/terrain_set = 0
|
||||||
0:1/0/terrain = 0
|
0:1/0/terrain = 0
|
||||||
|
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -4.4608307, -16, -4.1422005, 16, -16, 16)
|
||||||
0:1/0/terrains_peering_bit/right_side = 0
|
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_right_corner = 0
|
||||||
0:1/0/terrains_peering_bit/bottom_side = 0
|
0:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
@ -106,6 +110,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
2:1/0 = 0
|
2:1/0 = 0
|
||||||
2:1/0/terrain_set = 0
|
2:1/0/terrain_set = 0
|
||||||
2:1/0/terrain = 0
|
2:1/0/terrain = 0
|
||||||
|
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.603031, -16, 16, -16, 16, 16, 8.603031, 16, 8.284401, 16)
|
||||||
2:1/0/terrains_peering_bit/bottom_side = 0
|
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/bottom_left_corner = 0
|
||||||
2:1/0/terrains_peering_bit/left_side = 0
|
2:1/0/terrains_peering_bit/left_side = 0
|
||||||
@ -114,6 +119,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
4:1/0 = 0
|
4:1/0 = 0
|
||||||
4:1/0/terrain_set = 0
|
4:1/0/terrain_set = 0
|
||||||
4:1/0/terrain = 0
|
4:1/0/terrain = 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/bottom_side = 0
|
||||||
4:1/0/terrains_peering_bit/top_side = 0
|
4:1/0/terrains_peering_bit/top_side = 0
|
||||||
6:1/0 = 0
|
6:1/0 = 0
|
||||||
@ -187,6 +193,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
0:2/0 = 0
|
0:2/0 = 0
|
||||||
0:2/0/terrain_set = 0
|
0:2/0/terrain_set = 0
|
||||||
0:2/0/terrain = 0
|
0:2/0/terrain = 0
|
||||||
|
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -4.4608307, -16, -4.1422005, 16, -16, 16)
|
||||||
0:2/0/terrains_peering_bit/right_side = 0
|
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_side = 0
|
||||||
0:2/0/terrains_peering_bit/top_right_corner = 0
|
0:2/0/terrains_peering_bit/top_right_corner = 0
|
||||||
@ -201,12 +208,14 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
2:2/0 = 0
|
2:2/0 = 0
|
||||||
2:2/0/terrain_set = 0
|
2:2/0/terrain_set = 0
|
||||||
2:2/0/terrain = 0
|
2:2/0/terrain = 0
|
||||||
|
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.603031, -16, 16, -16, 16, 16, 8.603031, 16, 8.284401, 16)
|
||||||
2:2/0/terrains_peering_bit/left_side = 0
|
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_left_corner = 0
|
||||||
2:2/0/terrains_peering_bit/top_side = 0
|
2:2/0/terrains_peering_bit/top_side = 0
|
||||||
4:2/0 = 0
|
4:2/0 = 0
|
||||||
4:2/0/terrain_set = 0
|
4:2/0/terrain_set = 0
|
||||||
4:2/0/terrain = 0
|
4:2/0/terrain = 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
|
4:2/0/terrains_peering_bit/top_side = 0
|
||||||
6:3/0 = 0
|
6:3/0 = 0
|
||||||
6:3/0/terrain_set = 0
|
6:3/0/terrain_set = 0
|
||||||
@ -227,6 +236,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
9:3/0 = 0
|
9:3/0 = 0
|
||||||
9:3/0/terrain_set = 0
|
9:3/0/terrain_set = 0
|
||||||
9:3/0/terrain = 0
|
9:3/0/terrain = 0
|
||||||
|
9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
9:3/0/terrains_peering_bit/right_side = 0
|
9:3/0/terrains_peering_bit/right_side = 0
|
||||||
9:3/0/terrains_peering_bit/bottom_side = 0
|
9:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
9:3/0/terrains_peering_bit/bottom_left_corner = 0
|
9:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
@ -234,6 +244,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
10:3/0 = 0
|
10:3/0 = 0
|
||||||
10:3/0/terrain_set = 0
|
10:3/0/terrain_set = 0
|
||||||
10:3/0/terrain = 0
|
10:3/0/terrain = 0
|
||||||
|
10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
10:3/0/terrains_peering_bit/right_side = 0
|
10:3/0/terrains_peering_bit/right_side = 0
|
||||||
10:3/0/terrains_peering_bit/bottom_right_corner = 0
|
10:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
10:3/0/terrains_peering_bit/bottom_side = 0
|
10:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
@ -241,38 +252,45 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
12:3/0 = 0
|
12:3/0 = 0
|
||||||
12:3/0/terrain_set = 0
|
12:3/0/terrain_set = 0
|
||||||
12:3/0/terrain = 0
|
12:3/0/terrain = 0
|
||||||
|
12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -6.691246, -16, -6.372616, 16, -16, 16)
|
||||||
12:3/0/terrains_peering_bit/right_side = 0
|
12:3/0/terrains_peering_bit/right_side = 0
|
||||||
12:3/0/terrains_peering_bit/bottom_side = 0
|
12:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
12:3/0/terrains_peering_bit/top_side = 0
|
12:3/0/terrains_peering_bit/top_side = 0
|
||||||
13:3/0 = 0
|
13:3/0 = 0
|
||||||
13:3/0/terrain_set = 0
|
13:3/0/terrain_set = 0
|
||||||
13:3/0/terrain = 0
|
13:3/0/terrain = 0
|
||||||
|
13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
13:3/0/terrains_peering_bit/right_side = 0
|
13:3/0/terrains_peering_bit/right_side = 0
|
||||||
13:3/0/terrains_peering_bit/bottom_side = 0
|
13:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
13:3/0/terrains_peering_bit/left_side = 0
|
13:3/0/terrains_peering_bit/left_side = 0
|
||||||
15:3/0 = 0
|
15:3/0 = 0
|
||||||
15:3/0/terrain_set = 0
|
15:3/0/terrain_set = 0
|
||||||
15:3/0/terrain = 0
|
15:3/0/terrain = 0
|
||||||
|
15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
15:3/0/terrains_peering_bit/right_side = 0
|
15:3/0/terrains_peering_bit/right_side = 0
|
||||||
15:3/0/terrains_peering_bit/bottom_side = 0
|
15:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
15:3/0/terrains_peering_bit/left_side = 0
|
15:3/0/terrains_peering_bit/left_side = 0
|
||||||
16:3/0 = 0
|
16:3/0 = 0
|
||||||
16:3/0/terrain_set = 0
|
16:3/0/terrain_set = 0
|
||||||
16:3/0/terrain = 0
|
16:3/0/terrain = 0
|
||||||
|
16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
16:3/0/terrains_peering_bit/bottom_side = 0
|
16:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
16:3/0/terrains_peering_bit/left_side = 0
|
16:3/0/terrains_peering_bit/left_side = 0
|
||||||
0:4/0 = 0
|
0:4/0 = 0
|
||||||
0:4/0/terrain_set = 0
|
0:4/0/terrain_set = 0
|
||||||
0:4/0/terrain = 0
|
0:4/0/terrain = 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
|
0:4/0/terrains_peering_bit/right_side = 0
|
||||||
1:4/0 = 0
|
1:4/0 = 0
|
||||||
1:4/0/terrain_set = 0
|
1:4/0/terrain_set = 0
|
||||||
1:4/0/terrain = 0
|
1:4/0/terrain = 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/right_side = 0
|
||||||
1:4/0/terrains_peering_bit/left_side = 0
|
1:4/0/terrains_peering_bit/left_side = 0
|
||||||
2:4/0 = 0
|
2:4/0 = 0
|
||||||
2:4/0/terrain_set = 0
|
2:4/0/terrain_set = 0
|
||||||
2:4/0/terrain = 0
|
2:4/0/terrain = 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
|
2:4/0/terrains_peering_bit/left_side = 0
|
||||||
4:4/0 = 0
|
4:4/0 = 0
|
||||||
4:4/0/terrain_set = 0
|
4:4/0/terrain_set = 0
|
||||||
@ -297,6 +315,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
9:4/0 = 0
|
9:4/0 = 0
|
||||||
9:4/0/terrain_set = 0
|
9:4/0/terrain_set = 0
|
||||||
9:4/0/terrain = 0
|
9:4/0/terrain = 0
|
||||||
|
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.186306, 16, 2.5490456, 16, 16, -16, 16)
|
||||||
9:4/0/terrains_peering_bit/right_side = 0
|
9:4/0/terrains_peering_bit/right_side = 0
|
||||||
9:4/0/terrains_peering_bit/left_side = 0
|
9:4/0/terrains_peering_bit/left_side = 0
|
||||||
9:4/0/terrains_peering_bit/top_left_corner = 0
|
9:4/0/terrains_peering_bit/top_left_corner = 0
|
||||||
@ -304,6 +323,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
10:4/0 = 0
|
10:4/0 = 0
|
||||||
10:4/0/terrain_set = 0
|
10:4/0/terrain_set = 0
|
||||||
10:4/0/terrain = 0
|
10:4/0/terrain = 0
|
||||||
|
10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.186306, 16, 2.5490456, 16, 16, -16, 16)
|
||||||
10:4/0/terrains_peering_bit/right_side = 0
|
10:4/0/terrains_peering_bit/right_side = 0
|
||||||
10:4/0/terrains_peering_bit/left_side = 0
|
10:4/0/terrains_peering_bit/left_side = 0
|
||||||
10:4/0/terrains_peering_bit/top_side = 0
|
10:4/0/terrains_peering_bit/top_side = 0
|
||||||
@ -311,12 +331,14 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
12:4/0 = 0
|
12:4/0 = 0
|
||||||
12:4/0/terrain_set = 0
|
12:4/0/terrain_set = 0
|
||||||
12:4/0/terrain = 0
|
12:4/0/terrain = 0
|
||||||
|
12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 5.7353554, 16, 6.372616, 16, 16, -16, 16)
|
||||||
12:4/0/terrains_peering_bit/right_side = 0
|
12:4/0/terrains_peering_bit/right_side = 0
|
||||||
12:4/0/terrains_peering_bit/left_side = 0
|
12:4/0/terrains_peering_bit/left_side = 0
|
||||||
12:4/0/terrains_peering_bit/top_side = 0
|
12:4/0/terrains_peering_bit/top_side = 0
|
||||||
13:4/0 = 0
|
13:4/0 = 0
|
||||||
13:4/0/terrain_set = 0
|
13:4/0/terrain_set = 0
|
||||||
13:4/0/terrain = 0
|
13:4/0/terrain = 0
|
||||||
|
13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.284401, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
13:4/0/terrains_peering_bit/bottom_side = 0
|
13:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
13:4/0/terrains_peering_bit/bottom_left_corner = 0
|
13:4/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
13:4/0/terrains_peering_bit/left_side = 0
|
13:4/0/terrains_peering_bit/left_side = 0
|
||||||
@ -324,11 +346,13 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
15:4/0 = 0
|
15:4/0 = 0
|
||||||
15:4/0/terrain_set = 0
|
15:4/0/terrain_set = 0
|
||||||
15:4/0/terrain = 0
|
15:4/0/terrain = 0
|
||||||
|
15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
15:4/0/terrains_peering_bit/right_side = 0
|
15:4/0/terrains_peering_bit/right_side = 0
|
||||||
15:4/0/terrains_peering_bit/top_side = 0
|
15:4/0/terrains_peering_bit/top_side = 0
|
||||||
16:4/0 = 0
|
16:4/0 = 0
|
||||||
16:4/0/terrain_set = 0
|
16:4/0/terrain_set = 0
|
||||||
16:4/0/terrain = 0
|
16:4/0/terrain = 0
|
||||||
|
16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
16:4/0/terrains_peering_bit/left_side = 0
|
16:4/0/terrains_peering_bit/left_side = 0
|
||||||
16:4/0/terrains_peering_bit/top_side = 0
|
16:4/0/terrains_peering_bit/top_side = 0
|
||||||
8:1/0 = 0
|
8:1/0 = 0
|
||||||
@ -352,7 +376,7 @@ size = Vector2(82, 20)
|
|||||||
radius = 18.110771
|
radius = 18.110771
|
||||||
|
|
||||||
[node name="Game" type="Node2D" unique_id=1323011736]
|
[node name="Game" type="Node2D" unique_id=1323011736]
|
||||||
script = ExtResource("1_qxrlw")
|
position = Vector2(-8, -2)
|
||||||
|
|
||||||
[node name="SceneManager" type="Node2D" parent="." unique_id=711947929]
|
[node name="SceneManager" type="Node2D" parent="." unique_id=711947929]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
@ -360,7 +384,7 @@ position = Vector2(-39, 148)
|
|||||||
script = ExtResource("6_1l0tm")
|
script = ExtResource("6_1l0tm")
|
||||||
|
|
||||||
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=2001245533]
|
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=2001245533]
|
||||||
tile_map_data = PackedByteArray("AAALAAMAAAAEAAQAAAALAAUAAAAAAAQAAAAKAAUAAAAEAAQAAAAKAAQAAAAEAAQAAAALAAQAAAAEAAQAAAAMAAQAAAAEAAQAAAANAAQAAAAEAAQAAAANAAMAAAAEAAQAAAANAAIAAAAEAAQAAAAMAAIAAAAEAAQAAAAMAAMAAAAEAAQAAAAKAAMAAAAEAAIAAAAJAAMAAAAEAAIAAAAJAAQAAAAEAAQAAAAIAAQAAAAEAAQAAAAIAAMAAAACAAQAAAAMAAUAAAABAAQAAAANAAUAAAABAAQAAAAOAAUAAAABAAQAAAAPAAUAAAABAAQAAAAQAAUAAAABAAQAAAARAAAAAAAEAAEAAAARAAEAAAAEAAEAAAARAAIAAAAEAAEAAAARAAMAAAAEAAEAAAARAAQAAAAEAAEAAAARAAUAAAAEAAIAAAAIAAAAAAABAAAAAAAIAAEAAAAAAAEAAAAIAAIAAAAAAAIAAAAJAAIAAAABAAIAAAAJAAEAAAAAAAEAAAAKAAEAAAAAAAEAAAAKAAAAAAAEAAAAAAAJAAAAAAACAAQAAAAKAAIAAAACAAAAAAALAAEAAAACAAIAAAALAAAAAAAEAAAAAAAHAAEAAAACAAEAAAAHAAIAAAACAAEAAAAHAAMAAAACAAIAAAAGAAMAAAAAAAIAAAAGAAIAAAAAAAEAAAAHAAAAAAABAAAAAAAGAAAAAAAAAAAAAAAGAAEAAAAAAAEAAAAOAP3/AAAAAAAAAAAOAP7/AAAAAAEAAAAPAP7/AAACAAEAAAAPAP//AAABAAIAAAAQAP7/AAACAAEAAAAQAP3/AAACAAAAAAAPAP3/AAABAAAAAAAOAP//AAAAAAIAAAAQAP//AAACAAIAAAARAP//AAAEAAAAAAAQAAoAAAAGAAAAAAAQAAsAAAABAAIAAAARAAsAAAABAAIAAAASAAsAAAACAAIAAAASAAoAAAAHAAMAAAASAAkAAAACAAEAAAARAAoAAAAGAAAAAAARAAkAAAAHAAAAAAAQAAkAAAAGAAAAAAAPAAkAAAAAAAEAAAARAAgAAAABAAAAAAAQAAgAAAABAAAAAAAPAAgAAAAAAAAAAAAPAAsAAAAAAAIAAAAPAAoAAAAAAAEAAAASAAgAAAACAAAAAAAGAAUAAAAAAAAAAAAHAAUAAAACAAAAAAAHAAYAAAACAAIAAAAGAAYAAAAAAAIAAAAPAAMAAAAEAAQAAAA=")
|
tile_map_data = PackedByteArray("AAALAAMAAAAEAAAAAAAMAAQAAAABAAQAAAANAAMAAAAEAAAAAAAMAAMAAAAEAAQAAAAMAAUAAAABAAQAAAANAAUAAAAJAAQAAAAPAAMAAAAEAAQAAAALAAQAAAAJAAEAAAANAAQAAAACAAEAAAALAAUAAAAKAAQAAAAKAAUAAAANAAMAAAAJAAUAAAANAAMAAAAIAAUAAAANAAMAAAAHAAUAAAANAAMAAAAGAAUAAAAPAAMAAAAFAAUAAAABAAQAAAAOAAUAAAABAAQAAAAPAAUAAAABAAQAAAAQAAUAAAABAAQAAAARAAUAAAABAAQAAAASAAUAAAABAAQAAAATAAUAAAABAAQAAAAUAAUAAAABAAQAAAAVAAUAAAABAAQAAAA=")
|
||||||
tile_set = SubResource("TileSet_h4fw4")
|
tile_set = SubResource("TileSet_h4fw4")
|
||||||
|
|
||||||
[node name="platfrom" type="StaticBody2D" parent="." unique_id=446401574]
|
[node name="platfrom" type="StaticBody2D" parent="." unique_id=446401574]
|
||||||
@ -379,7 +403,7 @@ metadata/_edit_group_ = true
|
|||||||
shape = SubResource("WorldBoundaryShape2D_2poj3")
|
shape = SubResource("WorldBoundaryShape2D_2poj3")
|
||||||
|
|
||||||
[node name="Player" parent="." unique_id=872670144 instance=ExtResource("3_i6g32")]
|
[node name="Player" parent="." unique_id=872670144 instance=ExtResource("3_i6g32")]
|
||||||
position = Vector2(498, 86)
|
position = Vector2(475, 147)
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="." unique_id=1630381885]
|
[node name="Area2D" type="Area2D" parent="." unique_id=1630381885]
|
||||||
position = Vector2(447, 155)
|
position = Vector2(447, 155)
|
||||||
@ -393,10 +417,18 @@ debug_color = Color(0.77940935, 0.23498747, 0.906131, 0.41960785)
|
|||||||
[node name="Crates" type="Node2D" parent="." unique_id=381122866]
|
[node name="Crates" type="Node2D" parent="." unique_id=381122866]
|
||||||
|
|
||||||
[node name="crate1" parent="Crates" unique_id=2099388145 instance=ExtResource("2_wowpa")]
|
[node name="crate1" parent="Crates" unique_id=2099388145 instance=ExtResource("2_wowpa")]
|
||||||
position = Vector2(331, 234)
|
position = Vector2(545, 136)
|
||||||
|
|
||||||
[node name="RigidBody2D" parent="Crates" unique_id=1094262304 instance=ExtResource("2_wowpa")]
|
[node name="RigidBody2D" parent="Crates" unique_id=1094262304 instance=ExtResource("2_wowpa")]
|
||||||
position = Vector2(447, 47)
|
position = Vector2(252, 66.99999)
|
||||||
|
|
||||||
|
[node name="Enemies" type="Node2D" parent="." unique_id=1049899688]
|
||||||
|
|
||||||
|
[node name="Slime" parent="Enemies" unique_id=1791005633 instance=ExtResource("6_i6g32")]
|
||||||
|
position = Vector2(505, 148)
|
||||||
|
|
||||||
|
[node name="Slime2" parent="Enemies" unique_id=834201238 instance=ExtResource("6_i6g32")]
|
||||||
|
position = Vector2(308, 147)
|
||||||
|
|
||||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||||
[connection signal="triggerActiveSignal" from="Area2D" to="." method="_on_triggerSignal"]
|
[connection signal="triggerActiveSignal" from="Area2D" to="." method="_on_triggerSignal"]
|
||||||
|
|||||||
415
Scenes/level 2.tscn
Normal file
415
Scenes/level 2.tscn
Normal file
@ -0,0 +1,415 @@
|
|||||||
|
[gd_scene format=4 uid="uid://2riamqvpf85s"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://qhll446powxt" path="res://Scripts/scene_manager.gd" id="1_3y0qb"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://q4k62sp2sa6y" path="res://assets/graphics/Enviroments/Terrain (32x32).png" id="2_b0hvr"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dmk1mp1hqm62b" path="res://Scenes/player.tscn" id="3_ye6am"]
|
||||||
|
[ext_resource type="Script" uid="uid://kb3v21msvi17" path="res://Scripts/trigger.gd" id="4_l6jtc"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bsroh4vsjwblh" path="res://Scenes/crate.tscn" id="5_5piik"]
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
|
||||||
|
texture = ExtResource("2_b0hvr")
|
||||||
|
texture_region_size = Vector2i(32, 32)
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/terrain_set = 0
|
||||||
|
0:0/0/terrain = 0
|
||||||
|
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/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/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/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/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/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/terrain = 0
|
||||||
|
9:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
9:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
9:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
9:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
9:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:0/0 = 0
|
||||||
|
10:0/0/terrain_set = 0
|
||||||
|
10:0/0/terrain = 0
|
||||||
|
10:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
10:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
10:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
12:0/0 = 0
|
||||||
|
12:0/0/terrain_set = 0
|
||||||
|
12:0/0/terrain = 0
|
||||||
|
12:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
12:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
12:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
12:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
13:0/0 = 0
|
||||||
|
13:0/0/terrain_set = 0
|
||||||
|
13:0/0/terrain = 0
|
||||||
|
13:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
13:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
13:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
13:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:0/0 = 0
|
||||||
|
15:0/0/terrain_set = 0
|
||||||
|
15:0/0/terrain = 0
|
||||||
|
15:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
15:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
15:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/terrain_set = 0
|
||||||
|
0:1/0/terrain = 0
|
||||||
|
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
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/terrain_set = 0
|
||||||
|
2:1/0/terrain = 0
|
||||||
|
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/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/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/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/terrain_set = 0
|
||||||
|
9:1/0/terrain = 0
|
||||||
|
9:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
9:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
9:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
9:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
10:1/0 = 0
|
||||||
|
10:1/0/terrain_set = 0
|
||||||
|
10:1/0/terrain = 0
|
||||||
|
10:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
12:1/0 = 0
|
||||||
|
12:1/0/terrain_set = 0
|
||||||
|
12:1/0/terrain = 0
|
||||||
|
12:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
12:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
12:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
13:1/0 = 0
|
||||||
|
13:1/0/terrain_set = 0
|
||||||
|
13:1/0/terrain = 0
|
||||||
|
13:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
13:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
13:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:1/0 = 0
|
||||||
|
15:1/0/terrain_set = 0
|
||||||
|
15:1/0/terrain = 0
|
||||||
|
15:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
15:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
16:1/0 = 0
|
||||||
|
16:1/0/terrain_set = 0
|
||||||
|
16:1/0/terrain = 0
|
||||||
|
16:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
16:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
16:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
16:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
16:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
16:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:2/0 = 0
|
||||||
|
0:2/0/terrain_set = 0
|
||||||
|
0:2/0/terrain = 0
|
||||||
|
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/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/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/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/terrain_set = 0
|
||||||
|
6:3/0/terrain = 0
|
||||||
|
6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -3.5049381, -13.06386, -3.5049381, 16, -16, 16)
|
||||||
|
6:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
6:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
6:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
6:3/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
7:3/0 = 0
|
||||||
|
7:3/0/terrain_set = 0
|
||||||
|
7:3/0/terrain = 0
|
||||||
|
7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.921661, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
|
7:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
7:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
7:3/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
7:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
9:3/0 = 0
|
||||||
|
9:3/0/terrain_set = 0
|
||||||
|
9:3/0/terrain = 0
|
||||||
|
9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
|
9:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
9:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
9:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:3/0 = 0
|
||||||
|
10:3/0/terrain_set = 0
|
||||||
|
10:3/0/terrain = 0
|
||||||
|
10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
|
10:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
10:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
10:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
12:3/0 = 0
|
||||||
|
12:3/0/terrain_set = 0
|
||||||
|
12:3/0/terrain = 0
|
||||||
|
12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -6.691246, -16, -6.372616, 16, -16, 16)
|
||||||
|
12:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
12:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
13:3/0 = 0
|
||||||
|
13:3/0/terrain_set = 0
|
||||||
|
13:3/0/terrain = 0
|
||||||
|
13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
|
13:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
13:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
15:3/0 = 0
|
||||||
|
15:3/0/terrain_set = 0
|
||||||
|
15:3/0/terrain = 0
|
||||||
|
15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
15:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
15:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
16:3/0 = 0
|
||||||
|
16:3/0/terrain_set = 0
|
||||||
|
16:3/0/terrain = 0
|
||||||
|
16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
16:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
16:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:4/0 = 0
|
||||||
|
0:4/0/terrain_set = 0
|
||||||
|
0:4/0/terrain = 0
|
||||||
|
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/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/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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
6:4/0 = 0
|
||||||
|
6:4/0/terrain_set = 0
|
||||||
|
6:4/0/terrain = 0
|
||||||
|
6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -3.5049381, -13.06386, -3.5049381, 16, -16, 16)
|
||||||
|
6:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
6:4/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
6:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
6:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
7:4/0 = 0
|
||||||
|
7:4/0/terrain_set = 0
|
||||||
|
7:4/0/terrain = 0
|
||||||
|
7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.921661, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
|
7:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
7:4/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
7:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
7:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
9:4/0 = 0
|
||||||
|
9:4/0/terrain_set = 0
|
||||||
|
9:4/0/terrain = 0
|
||||||
|
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.186306, 16, 2.5490456, 16, 16, -16, 16)
|
||||||
|
9:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
9:4/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
9:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:4/0 = 0
|
||||||
|
10:4/0/terrain_set = 0
|
||||||
|
10:4/0/terrain = 0
|
||||||
|
10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.186306, 16, 2.5490456, 16, 16, -16, 16)
|
||||||
|
10:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:4/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
12:4/0 = 0
|
||||||
|
12:4/0/terrain_set = 0
|
||||||
|
12:4/0/terrain = 0
|
||||||
|
12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 5.7353554, 16, 6.372616, 16, 16, -16, 16)
|
||||||
|
12:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
12:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
13:4/0 = 0
|
||||||
|
13:4/0/terrain_set = 0
|
||||||
|
13:4/0/terrain = 0
|
||||||
|
13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.284401, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
|
13:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:4/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
13:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
13:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:4/0 = 0
|
||||||
|
15:4/0/terrain_set = 0
|
||||||
|
15:4/0/terrain = 0
|
||||||
|
15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
15:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
16:4/0 = 0
|
||||||
|
16:4/0/terrain_set = 0
|
||||||
|
16:4/0/terrain = 0
|
||||||
|
16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
16:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
16:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
8:1/0 = 0
|
||||||
|
8:2/0 = 0
|
||||||
|
5:4/0 = 0
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id="TileSet_h4fw4"]
|
||||||
|
tile_size = Vector2i(32, 32)
|
||||||
|
physics_layer_0/collision_layer = 1
|
||||||
|
terrain_set_0/mode = 0
|
||||||
|
terrain_set_0/terrain_0/name = "Leafy Dirt"
|
||||||
|
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
||||||
|
sources/0 = SubResource("TileSetAtlasSource_v158k")
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2poj3"]
|
||||||
|
size = Vector2(82, 20)
|
||||||
|
|
||||||
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_2poj3"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_3dryh"]
|
||||||
|
radius = 18.110771
|
||||||
|
|
||||||
|
[node name="Game" type="Node2D" unique_id=1323011736]
|
||||||
|
|
||||||
|
[node name="SceneManager" type="Node2D" parent="." unique_id=711947929]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(-39, 148)
|
||||||
|
script = ExtResource("1_3y0qb")
|
||||||
|
|
||||||
|
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=2001245533]
|
||||||
|
tile_map_data = PackedByteArray("AAALAAMAAAAEAAAAAAALAAUAAAAPAAQAAAAKAAUAAAACAAQAAAAMAAQAAAABAAQAAAANAAMAAAAEAAAAAAAMAAMAAAAEAAQAAAAMAAUAAAABAAQAAAANAAUAAAAJAAQAAAAOAAUAAAABAAQAAAAPAAUAAAABAAQAAAAQAAUAAAABAAQAAAAOAP3/AAAAAAQAAAAQAP3/AAACAAQAAAAPAP3/AAABAAQAAAAPAAMAAAAEAAQAAAARAAUAAAAKAAQAAAASAAUAAAACAAIAAAARAAQAAAAAAAAAAAASAAQAAAAJAAMAAAATAAQAAAABAAQAAAAUAAQAAAABAAQAAAAVAAQAAAABAAQAAAAWAAQAAAABAAQAAAAXAAQAAAABAAQAAAAJAAUAAAABAAQAAAAIAAUAAAABAAQAAAALAAQAAAAAAAEAAAANAAQAAAACAAEAAAAHAAUAAAABAAQAAAAGAAUAAAABAAQAAAAFAAUAAAABAAQAAAAEAAUAAAAAAAQAAAAYAAQAAAABAAQAAAAZAAQAAAACAAQAAAA=")
|
||||||
|
tile_set = SubResource("TileSet_h4fw4")
|
||||||
|
|
||||||
|
[node name="platfrom" type="StaticBody2D" parent="." unique_id=446401574]
|
||||||
|
position = Vector2(399, 122)
|
||||||
|
constant_linear_velocity = Vector2(10, 0)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="platfrom" unique_id=1022493365]
|
||||||
|
shape = SubResource("RectangleShape2D_2poj3")
|
||||||
|
|
||||||
|
[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=1443311972]
|
||||||
|
position = Vector2(402, 247)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=1935948289]
|
||||||
|
shape = SubResource("WorldBoundaryShape2D_2poj3")
|
||||||
|
|
||||||
|
[node name="Player" parent="." unique_id=872670144 instance=ExtResource("3_ye6am")]
|
||||||
|
position = Vector2(498, 86)
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="." unique_id=1630381885]
|
||||||
|
position = Vector2(447, 155)
|
||||||
|
script = ExtResource("4_l6jtc")
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=180262903]
|
||||||
|
shape = SubResource("CircleShape2D_3dryh")
|
||||||
|
debug_color = Color(0.77940935, 0.23498747, 0.906131, 0.41960785)
|
||||||
|
|
||||||
|
[node name="Crates" type="Node2D" parent="." unique_id=381122866]
|
||||||
|
|
||||||
|
[node name="crate1" parent="Crates" unique_id=2099388145 instance=ExtResource("5_5piik")]
|
||||||
|
position = Vector2(331, 234)
|
||||||
|
|
||||||
|
[node name="RigidBody2D" parent="Crates" unique_id=1094262304 instance=ExtResource("5_5piik")]
|
||||||
|
position = Vector2(447, 47)
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||||
|
[connection signal="triggerActiveSignal" from="Area2D" to="." method="_on_triggerSignal"]
|
||||||
415
Scenes/level3.tscn
Normal file
415
Scenes/level3.tscn
Normal file
@ -0,0 +1,415 @@
|
|||||||
|
[gd_scene format=4 uid="uid://bgjx72l77l0wn"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://qhll446powxt" path="res://Scripts/scene_manager.gd" id="1_jaajx"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://q4k62sp2sa6y" path="res://assets/graphics/Enviroments/Terrain (32x32).png" id="2_mrxql"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dmk1mp1hqm62b" path="res://Scenes/player.tscn" id="3_qrg6c"]
|
||||||
|
[ext_resource type="Script" uid="uid://kb3v21msvi17" path="res://Scripts/trigger.gd" id="4_1x0xh"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bsroh4vsjwblh" path="res://Scenes/crate.tscn" id="5_h3ll2"]
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
|
||||||
|
texture = ExtResource("2_mrxql")
|
||||||
|
texture_region_size = Vector2i(32, 32)
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/terrain_set = 0
|
||||||
|
0:0/0/terrain = 0
|
||||||
|
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/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/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/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/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/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/terrain = 0
|
||||||
|
9:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
9:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
9:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
9:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
9:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:0/0 = 0
|
||||||
|
10:0/0/terrain_set = 0
|
||||||
|
10:0/0/terrain = 0
|
||||||
|
10:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
10:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
10:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
12:0/0 = 0
|
||||||
|
12:0/0/terrain_set = 0
|
||||||
|
12:0/0/terrain = 0
|
||||||
|
12:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
12:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
12:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
12:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
13:0/0 = 0
|
||||||
|
13:0/0/terrain_set = 0
|
||||||
|
13:0/0/terrain = 0
|
||||||
|
13:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
13:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
13:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
13:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:0/0 = 0
|
||||||
|
15:0/0/terrain_set = 0
|
||||||
|
15:0/0/terrain = 0
|
||||||
|
15:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
15:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
15:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/terrain_set = 0
|
||||||
|
0:1/0/terrain = 0
|
||||||
|
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
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/terrain_set = 0
|
||||||
|
2:1/0/terrain = 0
|
||||||
|
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/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/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/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/terrain_set = 0
|
||||||
|
9:1/0/terrain = 0
|
||||||
|
9:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
9:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
9:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
9:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
10:1/0 = 0
|
||||||
|
10:1/0/terrain_set = 0
|
||||||
|
10:1/0/terrain = 0
|
||||||
|
10:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
12:1/0 = 0
|
||||||
|
12:1/0/terrain_set = 0
|
||||||
|
12:1/0/terrain = 0
|
||||||
|
12:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
12:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
12:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
13:1/0 = 0
|
||||||
|
13:1/0/terrain_set = 0
|
||||||
|
13:1/0/terrain = 0
|
||||||
|
13:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
13:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
13:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:1/0 = 0
|
||||||
|
15:1/0/terrain_set = 0
|
||||||
|
15:1/0/terrain = 0
|
||||||
|
15:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
15:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
16:1/0 = 0
|
||||||
|
16:1/0/terrain_set = 0
|
||||||
|
16:1/0/terrain = 0
|
||||||
|
16:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
16:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
16:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
16:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
16:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
16:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:2/0 = 0
|
||||||
|
0:2/0/terrain_set = 0
|
||||||
|
0:2/0/terrain = 0
|
||||||
|
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/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/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/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/terrain_set = 0
|
||||||
|
6:3/0/terrain = 0
|
||||||
|
6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -3.5049381, -13.06386, -3.5049381, 16, -16, 16)
|
||||||
|
6:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
6:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
6:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
6:3/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
7:3/0 = 0
|
||||||
|
7:3/0/terrain_set = 0
|
||||||
|
7:3/0/terrain = 0
|
||||||
|
7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.921661, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
|
7:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
7:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
7:3/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
7:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
9:3/0 = 0
|
||||||
|
9:3/0/terrain_set = 0
|
||||||
|
9:3/0/terrain = 0
|
||||||
|
9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
|
9:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
9:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
9:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:3/0 = 0
|
||||||
|
10:3/0/terrain_set = 0
|
||||||
|
10:3/0/terrain = 0
|
||||||
|
10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
|
10:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
10:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
10:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
12:3/0 = 0
|
||||||
|
12:3/0/terrain_set = 0
|
||||||
|
12:3/0/terrain = 0
|
||||||
|
12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -6.691246, -16, -6.372616, 16, -16, 16)
|
||||||
|
12:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
12:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
13:3/0 = 0
|
||||||
|
13:3/0/terrain_set = 0
|
||||||
|
13:3/0/terrain = 0
|
||||||
|
13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.8235683, -16, -4.1422005)
|
||||||
|
13:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
13:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
15:3/0 = 0
|
||||||
|
15:3/0/terrain_set = 0
|
||||||
|
15:3/0/terrain = 0
|
||||||
|
15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
15:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
15:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
16:3/0 = 0
|
||||||
|
16:3/0/terrain_set = 0
|
||||||
|
16:3/0/terrain = 0
|
||||||
|
16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
16:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
16:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:4/0 = 0
|
||||||
|
0:4/0/terrain_set = 0
|
||||||
|
0:4/0/terrain = 0
|
||||||
|
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/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/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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
6:4/0 = 0
|
||||||
|
6:4/0/terrain_set = 0
|
||||||
|
6:4/0/terrain = 0
|
||||||
|
6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -3.5049381, -13.06386, -3.5049381, 16, -16, 16)
|
||||||
|
6:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
6:4/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
6:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
6:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
7:4/0 = 0
|
||||||
|
7:4/0/terrain_set = 0
|
||||||
|
7:4/0/terrain = 0
|
||||||
|
7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.921661, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
|
7:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
7:4/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
7:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
7:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
9:4/0 = 0
|
||||||
|
9:4/0/terrain_set = 0
|
||||||
|
9:4/0/terrain = 0
|
||||||
|
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.186306, 16, 2.5490456, 16, 16, -16, 16)
|
||||||
|
9:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
9:4/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
9:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:4/0 = 0
|
||||||
|
10:4/0/terrain_set = 0
|
||||||
|
10:4/0/terrain = 0
|
||||||
|
10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.186306, 16, 2.5490456, 16, 16, -16, 16)
|
||||||
|
10:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:4/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
12:4/0 = 0
|
||||||
|
12:4/0/terrain_set = 0
|
||||||
|
12:4/0/terrain = 0
|
||||||
|
12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 5.7353554, 16, 6.372616, 16, 16, -16, 16)
|
||||||
|
12:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
12:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
12:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
13:4/0 = 0
|
||||||
|
13:4/0/terrain_set = 0
|
||||||
|
13:4/0/terrain = 0
|
||||||
|
13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8.284401, -16, 16, -16, 16, 16, 8.603031, 16)
|
||||||
|
13:4/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
13:4/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
13:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
13:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
15:4/0 = 0
|
||||||
|
15:4/0/terrain_set = 0
|
||||||
|
15:4/0/terrain = 0
|
||||||
|
15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
15:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
15:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
16:4/0 = 0
|
||||||
|
16:4/0/terrain_set = 0
|
||||||
|
16:4/0/terrain = 0
|
||||||
|
16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
|
||||||
|
16:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
16:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
8:1/0 = 0
|
||||||
|
8:2/0 = 0
|
||||||
|
5:4/0 = 0
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id="TileSet_h4fw4"]
|
||||||
|
tile_size = Vector2i(32, 32)
|
||||||
|
physics_layer_0/collision_layer = 1
|
||||||
|
terrain_set_0/mode = 0
|
||||||
|
terrain_set_0/terrain_0/name = "Leafy Dirt"
|
||||||
|
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
||||||
|
sources/0 = SubResource("TileSetAtlasSource_v158k")
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2poj3"]
|
||||||
|
size = Vector2(82, 20)
|
||||||
|
|
||||||
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_2poj3"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_3dryh"]
|
||||||
|
radius = 18.110771
|
||||||
|
|
||||||
|
[node name="Game" type="Node2D" unique_id=1323011736]
|
||||||
|
|
||||||
|
[node name="SceneManager" type="Node2D" parent="." unique_id=711947929]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(-39, 148)
|
||||||
|
script = ExtResource("1_jaajx")
|
||||||
|
|
||||||
|
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=2001245533]
|
||||||
|
tile_map_data = PackedByteArray("AAALAAMAAAAEAAAAAAALAAUAAAAPAAQAAAAKAAUAAAACAAQAAAAMAAQAAAABAAQAAAANAAMAAAAEAAAAAAAMAAMAAAAEAAQAAAAMAAUAAAABAAQAAAANAAUAAAAJAAQAAAAOAAUAAAABAAQAAAAPAAUAAAABAAQAAAAQAAUAAAABAAQAAAAOAP3/AAAAAAQAAAAQAP3/AAACAAQAAAAPAP3/AAABAAQAAAAPAAMAAAAEAAQAAAARAAUAAAAKAAQAAAASAAUAAAACAAIAAAARAAQAAAAAAAAAAAASAAQAAAAJAAMAAAATAAQAAAABAAQAAAAUAAQAAAABAAQAAAAVAAQAAAABAAQAAAAWAAQAAAABAAQAAAAXAAQAAAABAAQAAAAJAAUAAAABAAQAAAAIAAUAAAABAAQAAAALAAQAAAAAAAEAAAANAAQAAAACAAEAAAAHAAUAAAABAAQAAAAGAAUAAAABAAQAAAAFAAUAAAABAAQAAAAEAAUAAAAAAAQAAAAYAAQAAAABAAQAAAAZAAQAAAACAAQAAAA=")
|
||||||
|
tile_set = SubResource("TileSet_h4fw4")
|
||||||
|
|
||||||
|
[node name="platfrom" type="StaticBody2D" parent="." unique_id=446401574]
|
||||||
|
position = Vector2(399, 122)
|
||||||
|
constant_linear_velocity = Vector2(10, 0)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="platfrom" unique_id=1022493365]
|
||||||
|
shape = SubResource("RectangleShape2D_2poj3")
|
||||||
|
|
||||||
|
[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=1443311972]
|
||||||
|
position = Vector2(402, 247)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=1935948289]
|
||||||
|
shape = SubResource("WorldBoundaryShape2D_2poj3")
|
||||||
|
|
||||||
|
[node name="Player" parent="." unique_id=872670144 instance=ExtResource("3_qrg6c")]
|
||||||
|
position = Vector2(498, 86)
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="." unique_id=1630381885]
|
||||||
|
position = Vector2(447, 155)
|
||||||
|
script = ExtResource("4_1x0xh")
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=180262903]
|
||||||
|
shape = SubResource("CircleShape2D_3dryh")
|
||||||
|
debug_color = Color(0.77940935, 0.23498747, 0.906131, 0.41960785)
|
||||||
|
|
||||||
|
[node name="Crates" type="Node2D" parent="." unique_id=381122866]
|
||||||
|
|
||||||
|
[node name="crate1" parent="Crates" unique_id=2099388145 instance=ExtResource("5_h3ll2")]
|
||||||
|
position = Vector2(331, 234)
|
||||||
|
|
||||||
|
[node name="RigidBody2D" parent="Crates" unique_id=1094262304 instance=ExtResource("5_h3ll2")]
|
||||||
|
position = Vector2(447, 47)
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||||
|
[connection signal="triggerActiveSignal" from="Area2D" to="." method="_on_triggerSignal"]
|
||||||
75
Scenes/slime.tscn
Normal file
75
Scenes/slime.tscn
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
[gd_scene format=3 uid="uid://dkp7dy7npof2g"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cvdfmap7kwo02" path="res://assets/graphics/Enemies/slime_green.png" id="1_jokqx"]
|
||||||
|
[ext_resource type="Script" uid="uid://ca13ras6c8xw3" path="res://Scripts/slime.gd" id="1_swwnm"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_swwnm"]
|
||||||
|
atlas = ExtResource("1_jokqx")
|
||||||
|
region = Rect2(0, 24, 24, 24)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aiwxb"]
|
||||||
|
atlas = ExtResource("1_jokqx")
|
||||||
|
region = Rect2(24, 24, 24, 24)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_paq7w"]
|
||||||
|
atlas = ExtResource("1_jokqx")
|
||||||
|
region = Rect2(48, 24, 24, 24)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_f4si1"]
|
||||||
|
atlas = ExtResource("1_jokqx")
|
||||||
|
region = Rect2(72, 24, 24, 24)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_5gljc"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_swwnm")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_aiwxb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_paq7w")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_f4si1")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"idle",
|
||||||
|
"speed": 12.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vblni"]
|
||||||
|
size = Vector2(18, 17)
|
||||||
|
|
||||||
|
[node name="Slime" type="Area2D" unique_id=1791005633]
|
||||||
|
script = ExtResource("1_swwnm")
|
||||||
|
|
||||||
|
[node name="SlimeGraphic" type="AnimatedSprite2D" parent="." unique_id=285767010]
|
||||||
|
texture_filter = 1
|
||||||
|
position = Vector2(0, -2)
|
||||||
|
sprite_frames = SubResource("SpriteFrames_5gljc")
|
||||||
|
animation = &"idle"
|
||||||
|
autoplay = "idle"
|
||||||
|
frame = 3
|
||||||
|
frame_progress = 0.89758253
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1963753671]
|
||||||
|
position = Vector2(0, 1.5)
|
||||||
|
shape = SubResource("RectangleShape2D_vblni")
|
||||||
|
|
||||||
|
[node name="Rightcast" type="RayCast2D" parent="." unique_id=1783847293]
|
||||||
|
target_position = Vector2(12, 0)
|
||||||
|
|
||||||
|
[node name="LeftCast" type="RayCast2D" parent="." unique_id=500912486]
|
||||||
|
target_position = Vector2(-12, 0)
|
||||||
|
|
||||||
|
[node name="LeftDownCast" type="RayCast2D" parent="." unique_id=586259475]
|
||||||
|
position = Vector2(-7, 0)
|
||||||
|
target_position = Vector2(0, 14)
|
||||||
|
|
||||||
|
[node name="RightDownCast" type="RayCast2D" parent="." unique_id=54037895]
|
||||||
|
position = Vector2(7, 0)
|
||||||
|
target_position = Vector2(0, 14)
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
@ -1,12 +1,42 @@
|
|||||||
class_name GameController extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
signal destroySignal(body)
|
signal destroySignal(body)
|
||||||
|
signal levelChangeSignal(level)
|
||||||
|
|
||||||
|
var levels = ["res://Scenes/game.tscn","res://Scenes/level 2.tscn","res://Scenes/level3.tscn"]
|
||||||
|
var currentLevel = 0
|
||||||
|
var timers = [5,10,15]
|
||||||
|
var timeAvailable=0
|
||||||
|
|
||||||
|
var timer = Timer.new()
|
||||||
|
#player variables
|
||||||
|
var playerCurrentHealth:int = 100
|
||||||
|
|
||||||
|
#enemies
|
||||||
|
var enemiesDict = {}
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
get_window().grab_focus()
|
get_window().grab_focus()
|
||||||
|
add_child(timer)
|
||||||
|
timer.wait_time = 1
|
||||||
|
timer.one_shot = false
|
||||||
|
timer.connect("timeout", secondCounter)
|
||||||
|
timer.start()
|
||||||
|
|
||||||
|
func secondCounter()->void:
|
||||||
|
print("tick")
|
||||||
|
timeAvailable-=1
|
||||||
|
if timeAvailable <=0:
|
||||||
|
print ("you loose!")
|
||||||
|
levelChangeSignal.emit(levels[currentLevel])
|
||||||
|
|
||||||
|
|
||||||
|
func reset() -> void:
|
||||||
|
timeAvailable = timers[currentLevel]
|
||||||
|
playerCurrentHealth = 100
|
||||||
|
|
||||||
|
get_window().grab_focus()
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
@ -21,3 +51,25 @@ func totalCrates(numberOfCrates:int)->void:
|
|||||||
print("GC knows total crates: "+str(numberOfCrates))
|
print("GC knows total crates: "+str(numberOfCrates))
|
||||||
if numberOfCrates <=0:
|
if numberOfCrates <=0:
|
||||||
print("You WON!!!!")
|
print("You WON!!!!")
|
||||||
|
currentLevel +=1
|
||||||
|
if currentLevel >= levels.size():
|
||||||
|
currentLevel = 0
|
||||||
|
levelChangeSignal.emit(levels[currentLevel])
|
||||||
|
|
||||||
|
func _on_slime_damage(_body, slime)->void:
|
||||||
|
print ("GC knows slime doing damage")
|
||||||
|
print("doing damage: "+str(enemiesDict[slime]["damage"]))
|
||||||
|
playerCurrentHealth -= enemiesDict[slime]["damage"]
|
||||||
|
if playerCurrentHealth <=0:
|
||||||
|
print ("U ded")
|
||||||
|
levelChangeSignal.emit(levels[currentLevel])
|
||||||
|
|
||||||
|
func addEnemyToLevel(slime)->void:
|
||||||
|
#give each enemy some health and damage
|
||||||
|
var randamage = randi_range(1,20)
|
||||||
|
|
||||||
|
var enemyStat = {
|
||||||
|
"health": 50,
|
||||||
|
"damage": 30+randamage
|
||||||
|
}
|
||||||
|
enemiesDict[slime]=enemyStat
|
||||||
|
|||||||
@ -1,10 +1,14 @@
|
|||||||
class_name SceneManager extends Node2D
|
class_name SceneManager extends Node2D
|
||||||
@onready var game: Node2D = $".."
|
|
||||||
@onready var crates: Node2D = $"../Crates"
|
@onready var crates: Node2D = $"../Crates"
|
||||||
var grenade = preload("res://Scenes/grenade.tscn")
|
var grenade = preload("res://Scenes/grenade.tscn")
|
||||||
|
@onready var enemies: Node2D = $"../Enemies"
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
GameController.reset()
|
||||||
print("Scene manager is ready!")
|
print("Scene manager is ready!")
|
||||||
game.destroySignal.connect(destroy)
|
GameController.destroySignal.connect(destroy)
|
||||||
|
GameController.levelChangeSignal.connect(changeScene)
|
||||||
buildLevel()
|
buildLevel()
|
||||||
|
|
||||||
func destroy(body)->void:
|
func destroy(body)->void:
|
||||||
@ -13,6 +17,18 @@ func destroy(body)->void:
|
|||||||
|
|
||||||
func buildLevel()->void:
|
func buildLevel()->void:
|
||||||
updateCrates()
|
updateCrates()
|
||||||
|
if enemies:
|
||||||
|
updateEnemies()
|
||||||
|
|
||||||
|
func updateEnemies()->void:
|
||||||
|
var totalEnemies = 0
|
||||||
|
for obj in enemies.get_children():
|
||||||
|
if obj is Slime:
|
||||||
|
totalEnemies +=1
|
||||||
|
#hook up signals
|
||||||
|
if not obj.slimeDamageSignal.is_connected(GameController._on_slime_damage):
|
||||||
|
obj.slimeDamageSignal.connect(GameController._on_slime_damage)
|
||||||
|
GameController.addEnemyToLevel(obj)
|
||||||
|
|
||||||
func updateCrates()->void:
|
func updateCrates()->void:
|
||||||
#is there a crate holder?
|
#is there a crate holder?
|
||||||
@ -24,7 +40,7 @@ func updateCrates()->void:
|
|||||||
obj.tree_exited.connect(updateCrates)
|
obj.tree_exited.connect(updateCrates)
|
||||||
_crateTotal +=1
|
_crateTotal +=1
|
||||||
print("Number of crates: "+str(_crateTotal))
|
print("Number of crates: "+str(_crateTotal))
|
||||||
game.totalCrates(_crateTotal)
|
GameController.totalCrates(_crateTotal)
|
||||||
|
|
||||||
func makeGrenade(_greandePosition, _grenadeDirection)->void:
|
func makeGrenade(_greandePosition, _grenadeDirection)->void:
|
||||||
print("SM wants to make a grenade")
|
print("SM wants to make a grenade")
|
||||||
@ -32,3 +48,6 @@ func makeGrenade(_greandePosition, _grenadeDirection)->void:
|
|||||||
owner.add_child(myGrenade)
|
owner.add_child(myGrenade)
|
||||||
myGrenade.transform = _greandePosition
|
myGrenade.transform = _greandePosition
|
||||||
myGrenade.apply_central_impulse(Vector2(_grenadeDirection, -1)*200)
|
myGrenade.apply_central_impulse(Vector2(_grenadeDirection, -1)*200)
|
||||||
|
func changeScene(level)->void:
|
||||||
|
print("SM wants to change scence"+level)
|
||||||
|
get_tree().call_deferred("change_scene_to_file", level)
|
||||||
|
|||||||
35
Scripts/slime.gd
Normal file
35
Scripts/slime.gd
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
class_name Slime extends Area2D
|
||||||
|
@onready var slime_graphic: AnimatedSprite2D = $SlimeGraphic
|
||||||
|
@onready var rightcast: RayCast2D = $Rightcast
|
||||||
|
@onready var left_cast: RayCast2D = $LeftCast
|
||||||
|
@onready var left_down_cast: RayCast2D = $LeftDownCast
|
||||||
|
@onready var right_down_cast: RayCast2D = $RightDownCast
|
||||||
|
|
||||||
|
signal slimeDamageSignal(body, slime)
|
||||||
|
|
||||||
|
var speed:int = 100
|
||||||
|
var direction = 1
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
#raycast detection
|
||||||
|
if rightcast.is_colliding() and not rightcast.get_collider() is Player:
|
||||||
|
direction = -1
|
||||||
|
slime_graphic.flip_h = true
|
||||||
|
if left_cast.is_colliding() and not left_cast.get_collider() is Player:
|
||||||
|
direction = 1
|
||||||
|
slime_graphic.flip_h = false
|
||||||
|
if not right_down_cast.is_colliding():
|
||||||
|
direction = -1
|
||||||
|
slime_graphic.flip_h = true
|
||||||
|
if not left_cast.is_colliding():
|
||||||
|
direction = +1
|
||||||
|
slime_graphic.flip_h = false
|
||||||
|
|
||||||
|
position.x += direction*speed*delta
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
|
if body is Player:
|
||||||
|
slimeDamageSignal.emit(body, self)
|
||||||
1
Scripts/slime.gd.uid
Normal file
1
Scripts/slime.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://ca13ras6c8xw3
|
||||||
BIN
assets/graphics/Enemies/slime_green.png
Normal file
BIN
assets/graphics/Enemies/slime_green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 908 B |
40
assets/graphics/Enemies/slime_green.png.import
Normal file
40
assets/graphics/Enemies/slime_green.png.import
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cvdfmap7kwo02"
|
||||||
|
path="res://.godot/imported/slime_green.png-ed926d16ca44ddd92b5b37c1c2a8b4c7.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/Enemies/slime_green.png"
|
||||||
|
dest_files=["res://.godot/imported/slime_green.png-ed926d16ca44ddd92b5b37c1c2a8b4c7.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@ -15,6 +15,10 @@ run/main_scene="uid://bcisk0tho1stb"
|
|||||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
GameController="*uid://ctdwfmqkny8rc"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/viewport_width=480
|
window/size/viewport_width=480
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user