From 6733fdbb726646c6568d9df3209d56abe5a616fa Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 23 Jul 2020 15:32:05 -0500 Subject: [PATCH] Level 3 working fr --- ai/Scenes/Demon.tscn | 2 +- ai/Scenes/Skeleton Enemy.tscn | 2 +- ai/Scenes/ogre.tscn | 12 +- ai/Script/Demon.gd | 5 +- levels/Campaign/Level 2/Level 2.tscn | 113 +++++++++++------- levels/Campaign/Level 3/Area2D.gd | 46 +++---- .../Level 3/{Level 3.tscn => Level_3.tscn} | 10 +- levels/Campaign/Level 3/TileMap2.gd | 16 +-- 8 files changed, 116 insertions(+), 90 deletions(-) rename levels/Campaign/Level 3/{Level 3.tscn => Level_3.tscn} (99%) diff --git a/ai/Scenes/Demon.tscn b/ai/Scenes/Demon.tscn index f5a2c15..917ed83 100644 --- a/ai/Scenes/Demon.tscn +++ b/ai/Scenes/Demon.tscn @@ -26,7 +26,7 @@ tracks/0/keys = { [node name="Demon" type="KinematicBody2D"] collision_layer = 4 -collision_mask = 7 +collision_mask = 15 script = ExtResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] diff --git a/ai/Scenes/Skeleton Enemy.tscn b/ai/Scenes/Skeleton Enemy.tscn index 2aeb3ce..47ef291 100644 --- a/ai/Scenes/Skeleton Enemy.tscn +++ b/ai/Scenes/Skeleton Enemy.tscn @@ -26,7 +26,7 @@ tracks/0/keys = { [node name="Skeleton Enemy" type="KinematicBody2D"] collision_layer = 4 -collision_mask = 7 +collision_mask = 15 script = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] diff --git a/ai/Scenes/ogre.tscn b/ai/Scenes/ogre.tscn index b5c6f86..48ef88e 100644 --- a/ai/Scenes/ogre.tscn +++ b/ai/Scenes/ogre.tscn @@ -5,8 +5,8 @@ [ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=3] [ext_resource path="res://Music and Fonts(Misc.)/Ogre Run.tres" type="Animation" id=4] -[sub_resource type="RectangleShape2D" id=3] -extents = Vector2( 10, 11 ) +[sub_resource type="CapsuleShape2D" id=1] +height = 4.0 [sub_resource type="CapsuleShape2D" id=2] radius = 12.0 @@ -15,17 +15,18 @@ height = 6.0 [node name="Ogre" type="KinematicBody2D"] collision_layer = 4 collision_mask = 2147483655 +collision/safe_margin = 2.518 script = ExtResource( 1 ) [node name="Sprite" type="Sprite" parent="."] position = Vector2( 0, -17 ) texture = ExtResource( 2 ) hframes = 4 -frame = 2 +frame = 3 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( 1, -11 ) -shape = SubResource( 3 ) +position = Vector2( 1, -12 ) +shape = SubResource( 1 ) [node name="DamageCD" type="Timer" parent="."] wait_time = 0.5 @@ -40,7 +41,6 @@ anims/Hit = ExtResource( 3 ) "anims/Ogre Hit" = ExtResource( 3 ) [node name="Area2D" type="Area2D" parent="."] -visible = false collision_layer = 0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] diff --git a/ai/Script/Demon.gd b/ai/Script/Demon.gd index 6af6d9c..6212830 100644 --- a/ai/Script/Demon.gd +++ b/ai/Script/Demon.gd @@ -23,12 +23,11 @@ func _physics_process(_delta): PlayerRaycast.cast_to = player_position - global_position var collider = PlayerRaycast.get_collider() - if dist >= 200: - if collider != null && collider.has_method("get_type") && collider.get_type() == "player": - shoot_fireball(position.direction_to(player_position)) if dist <= 200: velocity.x = position.direction_to(player_position).normalized().x * speed + if collider != null && collider.has_method("get_type") && collider.get_type() == "player": + shoot_fireball(position.direction_to(player_position)) else: velocity = Vector2(0, 0) diff --git a/levels/Campaign/Level 2/Level 2.tscn b/levels/Campaign/Level 2/Level 2.tscn index 6973a07..43e4597 100644 --- a/levels/Campaign/Level 2/Level 2.tscn +++ b/levels/Campaign/Level 2/Level 2.tscn @@ -3,21 +3,20 @@ [ext_resource path="res://meta/DungeonTilemap.tres" type="TileSet" id=1] [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=2] [ext_resource path="res://art/door.png" type="Texture" id=3] -[ext_resource path="res://objects/torch.tscn" type="PackedScene" id=4] +[ext_resource path="res://ai/Scenes/Demon.tscn" type="PackedScene" id=4] [ext_resource path="res://ai/Scenes/Skeleton Enemy.tscn" type="PackedScene" id=5] +[ext_resource path="res://ai/Scenes/ogre.tscn" type="PackedScene" id=6] [ext_resource path="res://levels/Campaign/Level 2/Area2D.gd" type="Script" id=7] [ext_resource path="res://objects/Door.tscn" type="PackedScene" id=8] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 1810, 13 ) -[sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 7, 39 ) - [node name="Level 2" type="Node"] [node name="Door" parent="." instance=ExtResource( 8 )] -position = Vector2( 896, 64 ) +position = Vector2( 2246, 144 ) +next_scene = "res://levels/Campaign/Level 3/Level 3.tscn" [node name="door" type="Sprite" parent="."] position = Vector2( 16, 161 ) @@ -32,52 +31,80 @@ cell_size = Vector2( 16, 16 ) collision_layer = 2 collision_mask = 0 format = 1 -tile_data = PoolIntArray( -3, 0, 8, -2, 0, 10, -1, 0, 10, -65536, 0, 10, -65535, 0, 10, -65534, 0, 10, -65533, 0, 10, -65532, 0, 10, -65531, 0, 10, -65530, 0, 10, -65529, 0, 10, -65528, 0, 10, -65527, 0, 10, -65526, 0, 10, -65525, 0, 10, -65524, 0, 10, -65523, 0, 10, -65522, 0, 10, -65521, 0, 10, -65520, 0, 10, -65519, 0, 10, -65518, 0, 10, -65517, 0, 10, -65516, 0, 10, -65515, 0, 10, -65514, 0, 10, -65513, 0, 10, -65512, 0, 10, -65511, 0, 10, -65510, 0, 10, -65509, 0, 10, -65508, 0, 10, -65507, 0, 10, -65506, 0, 10, -65505, 0, 10, -65504, 0, 10, -65503, 0, 10, -65502, 0, 10, -65501, 0, 10, -65500, 0, 10, -65499, 0, 10, -65498, 0, 10, -65497, 0, 10, -65496, 0, 10, -65495, 0, 10, -65494, 0, 10, -65493, 0, 10, -65492, 0, 10, -65491, 0, 10, -65490, 0, 10, -65489, 0, 10, -65488, 0, 10, -65487, 0, 10, -65486, 0, 10, -65485, 0, 10, -65484, 0, 10, -65483, 0, 10, -65482, 0, 10, -65481, 0, 10, -65480, 0, 10, -65479, 0, 10, -65478, 0, 10, -65477, 0, 10, -65476, 0, 11, 65533, 0, 65544, 65534, 0, 131081, 65535, 0, 131081, 0, 0, 131081, 1, 0, 131081, 2, 0, 131081, 3, 0, 131081, 4, 0, 131081, 5, 0, 131081, 6, 0, 131081, 7, 0, 131081, 8, 0, 131081, 9, 0, 131081, 10, 0, 131081, 11, 0, 131081, 12, 0, 131081, 13, 0, 131081, 14, 0, 131081, 15, 0, 131081, 16, 0, 131081, 17, 0, 131081, 18, 0, 131081, 19, 0, 131081, 20, 0, 131081, 21, 0, 131081, 22, 0, 131081, 23, 0, 131081, 24, 0, 131081, 25, 0, 131081, 26, 0, 131081, 27, 0, 131081, 28, 0, 131081, 29, 0, 131081, 30, 0, 131081, 31, 0, 131081, 32, 0, 131081, 33, 0, 131081, 34, 0, 131081, 35, 0, 131081, 36, 0, 131081, 37, 0, 131081, 38, 0, 131081, 39, 0, 131081, 40, 0, 131081, 41, 0, 131081, 42, 0, 131081, 43, 0, 131081, 44, 0, 131081, 45, 0, 131081, 46, 0, 131081, 47, 0, 131081, 48, 0, 131081, 49, 0, 131081, 50, 0, 131081, 51, 0, 131081, 52, 0, 131081, 53, 0, 131081, 54, 0, 131081, 55, 0, 131081, 56, 0, 131081, 57, 0, 131081, 58, 0, 131081, 59, 0, 131081, 60, 0, 131083, 131069, 0, 65544, 131070, 0, 131081, 131071, 0, 131078, 65536, 0, 196617, 65537, 0, 196617, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 196617, 65556, 0, 196617, 65557, 0, 196617, 65558, 0, 196617, 65559, 0, 196617, 65560, 0, 196617, 65561, 0, 196617, 65562, 0, 196617, 65563, 0, 196617, 65564, 0, 196617, 65565, 0, 196617, 65566, 0, 196617, 65567, 0, 196617, 65568, 0, 196617, 65569, 0, 196617, 65570, 0, 196617, 65571, 0, 196617, 65572, 0, 196617, 65573, 0, 196617, 65574, 0, 196617, 65575, 0, 196617, 65576, 0, 196617, 65577, 0, 196617, 65578, 0, 196617, 65579, 0, 196617, 65580, 0, 196617, 65581, 0, 196617, 65582, 0, 196617, 65583, 0, 196617, 65584, 0, 196617, 65585, 0, 196617, 65586, 0, 196617, 65587, 0, 196617, 65588, 0, 196617, 65589, 0, 196617, 65590, 0, 196617, 65591, 0, 196617, 65592, 0, 196617, 65593, 0, 196617, 65594, 0, 131077, 65595, 0, 131081, 65596, 0, 131083, 196605, 0, 65544, 196606, 0, 131081, 196607, 0, 131083, 131130, 0, 65544, 131131, 0, 131081, 131132, 0, 131083, 262141, 0, 65544, 262142, 0, 131081, 262143, 0, 131083, 196666, 0, 65544, 196667, 0, 131081, 196668, 0, 131083, 327677, 0, 65544, 327678, 0, 131081, 327679, 0, 131083, 262202, 0, 65544, 262203, 0, 131081, 262204, 0, 131083, 393213, 0, 65544, 393214, 0, 131081, 393215, 0, 131083, 327738, 0, 65544, 327739, 0, 131081, 327740, 0, 131083, 458749, 0, 65544, 458750, 0, 131081, 458751, 0, 131083, 393234, 0, 8, 393235, 0, 10, 393236, 0, 10, 393237, 0, 10, 393238, 0, 10, 393239, 0, 10, 393240, 0, 10, 393241, 0, 10, 393242, 0, 10, 393243, 0, 10, 393244, 0, 10, 393245, 0, 11, 393251, 0, 8, 393252, 0, 11, 393266, 0, 8, 393267, 0, 10, 393268, 0, 10, 393269, 0, 10, 393270, 0, 10, 393271, 0, 10, 393272, 0, 10, 393273, 0, 10, 393274, 0, 65541, 393275, 0, 131081, 393276, 0, 131083, 524285, 0, 65544, 524286, 0, 131081, 524287, 0, 131083, 458769, 0, 8, 458770, 0, 65541, 458771, 0, 131081, 458772, 0, 131081, 458773, 0, 131081, 458774, 0, 131081, 458775, 0, 131081, 458776, 0, 131081, 458777, 0, 131081, 458778, 0, 131081, 458779, 0, 131081, 458780, 0, 131081, 458781, 0, 131083, 458783, 0, 8, 458784, 0, 11, 458787, 0, 65544, 458788, 0, 131083, 458792, 0, 8, 458793, 0, 11, 458802, 0, 65544, 458803, 0, 131081, 458804, 0, 131081, 458805, 0, 131081, 458806, 0, 131081, 458807, 0, 131081, 458808, 0, 131081, 458809, 0, 131081, 458810, 0, 131081, 458811, 0, 131081, 458812, 0, 131083, 589821, 0, 65544, 589822, 0, 131081, 589823, 0, 131083, 524304, 0, 8, 524305, 0, 65541, 524306, 0, 131081, 524307, 0, 131081, 524308, 0, 131081, 524309, 0, 131081, 524310, 0, 131081, 524311, 0, 131081, 524312, 0, 131081, 524313, 0, 131081, 524314, 0, 131081, 524315, 0, 131081, 524316, 0, 131081, 524317, 0, 131083, 524319, 0, 65544, 524320, 0, 131083, 524323, 0, 65544, 524324, 0, 131083, 524328, 0, 65544, 524329, 0, 131083, 524334, 0, 8, 524335, 0, 11, 524338, 0, 65544, 524339, 0, 131081, 524340, 0, 131081, 524341, 0, 131081, 524342, 0, 131081, 524343, 0, 131081, 524344, 0, 131081, 524345, 0, 131081, 524346, 0, 131081, 524347, 0, 131081, 524348, 0, 131083, 655357, 0, 65544, 655358, 0, 131081, 655359, 0, 131083, 589839, 0, 8, 589840, 0, 65541, 589841, 0, 131081, 589842, 0, 131081, 589843, 0, 131081, 589844, 0, 131081, 589845, 0, 131081, 589846, 0, 131081, 589847, 0, 131081, 589848, 0, 131081, 589849, 0, 131081, 589850, 0, 131081, 589851, 0, 131081, 589852, 0, 131081, 589853, 0, 65542, 589854, 0, 10, 589855, 0, 65541, 589856, 0, 65542, 589857, 0, 10, 589858, 0, 10, 589859, 0, 65541, 589860, 0, 65542, 589861, 0, 10, 589862, 0, 10, 589863, 0, 10, 589864, 0, 65541, 589865, 0, 131083, 589870, 0, 65544, 589871, 0, 131083, 589874, 0, 65544, 589875, 0, 131081, 589876, 0, 131081, 589877, 0, 131081, 589878, 0, 131081, 589879, 0, 131081, 589880, 0, 131081, 589881, 0, 131081, 589882, 0, 131081, 589883, 0, 131081, 589884, 0, 131083, 720893, 0, 65544, 720894, 0, 131081, 720895, 0, 131083, 655374, 0, 8, 655375, 0, 65541, 655376, 0, 131081, 655377, 0, 131081, 655378, 0, 131081, 655379, 0, 131081, 655380, 0, 131081, 655381, 0, 131081, 655382, 0, 131081, 655383, 0, 131081, 655384, 0, 131081, 655385, 0, 131081, 655386, 0, 131081, 655387, 0, 131081, 655388, 0, 131081, 655389, 0, 131081, 655390, 0, 131081, 655391, 0, 131081, 655392, 0, 131081, 655393, 0, 131081, 655394, 0, 131081, 655395, 0, 131081, 655396, 0, 131081, 655397, 0, 131081, 655398, 0, 131081, 655399, 0, 131081, 655400, 0, 131081, 655401, 0, 65542, 655402, 0, 10, 655403, 0, 10, 655404, 0, 10, 655405, 0, 10, 655406, 0, 65541, 655407, 0, 65542, 655408, 0, 10, 655409, 0, 10, 655410, 0, 65541, 655411, 0, 131081, 655412, 0, 131081, 655413, 0, 131081, 655414, 0, 131081, 655415, 0, 131081, 655416, 0, 131081, 655417, 0, 131081, 655418, 0, 131081, 655419, 0, 131081, 655420, 0, 131083, 786429, 0, 65544, 786430, 0, 131081, 786431, 0, 65542, 720896, 0, 10, 720897, 0, 10, 720898, 0, 10, 720899, 0, 10, 720900, 0, 10, 720901, 0, 10, 720902, 0, 10, 720903, 0, 10, 720904, 0, 10, 720905, 0, 10, 720906, 0, 10, 720907, 0, 10, 720908, 0, 10, 720909, 0, 10, 720910, 0, 65541, 720911, 0, 131081, 720912, 0, 131081, 720913, 0, 131081, 720914, 0, 131081, 720915, 0, 131081, 720916, 0, 131081, 720917, 0, 131081, 720918, 0, 131081, 720919, 0, 131081, 720920, 0, 131081, 720921, 0, 131081, 720922, 0, 131081, 720923, 0, 131081, 720924, 0, 131081, 720925, 0, 131081, 720926, 0, 131081, 720927, 0, 131081, 720928, 0, 131081, 720929, 0, 131081, 720930, 0, 131081, 720931, 0, 131081, 720932, 0, 131081, 720933, 0, 131081, 720934, 0, 131081, 720935, 0, 131081, 720936, 0, 131081, 720937, 0, 131081, 720938, 0, 131081, 720939, 0, 131081, 720940, 0, 131081, 720941, 0, 131081, 720942, 0, 131081, 720943, 0, 131081, 720944, 0, 131081, 720945, 0, 131081, 720946, 0, 131081, 720947, 0, 131081, 720948, 0, 131081, 720949, 0, 131081, 720950, 0, 131081, 720951, 0, 131081, 720952, 0, 131081, 720953, 0, 131081, 720954, 0, 131081, 720955, 0, 131081, 720956, 0, 131083, 851965, 0, 65544, 851966, 0, 131081, 851967, 0, 131081, 786432, 0, 131081, 786433, 0, 131081, 786434, 0, 131081, 786435, 0, 131081, 786436, 0, 131081, 786437, 0, 131081, 786438, 0, 131081, 786439, 0, 131081, 786440, 0, 131081, 786441, 0, 131081, 786442, 0, 131081, 786443, 0, 131081, 786444, 0, 131081, 786445, 0, 131081, 786446, 0, 131081, 786447, 0, 131081, 786448, 0, 131081, 786449, 0, 131081, 786450, 0, 131081, 786451, 0, 131081, 786452, 0, 131081, 786453, 0, 131081, 786454, 0, 131081, 786455, 0, 131081, 786456, 0, 131081, 786457, 0, 131081, 786458, 0, 131081, 786459, 0, 131081, 786460, 0, 131081, 786461, 0, 131081, 786462, 0, 131081, 786463, 0, 131081, 786464, 0, 131081, 786465, 0, 131081, 786466, 0, 131081, 786467, 0, 131081, 786468, 0, 131081, 786469, 0, 131081, 786470, 0, 131081, 786471, 0, 131081, 786472, 0, 131081, 786473, 0, 131081, 786474, 0, 131081, 786475, 0, 131081, 786476, 0, 131081, 786477, 0, 131081, 786478, 0, 131081, 786479, 0, 131081, 786480, 0, 131081, 786481, 0, 131081, 786482, 0, 131081, 786483, 0, 131081, 786484, 0, 131081, 786485, 0, 131081, 786486, 0, 131081, 786487, 0, 131081, 786488, 0, 131081, 786489, 0, 131081, 786490, 0, 131081, 786491, 0, 131081, 786492, 0, 131083, 917501, 0, 196616, 917502, 0, 196617, 917503, 0, 196617, 851968, 0, 196617, 851969, 0, 196617, 851970, 0, 196617, 851971, 0, 196617, 851972, 0, 196617, 851973, 0, 196617, 851974, 0, 196617, 851975, 0, 196617, 851976, 0, 196617, 851977, 0, 196617, 851978, 0, 196617, 851979, 0, 196617, 851980, 0, 196617, 851981, 0, 196617, 851982, 0, 196617, 851983, 0, 196617, 851984, 0, 196617, 851985, 0, 196617, 851986, 0, 196617, 851987, 0, 196617, 851988, 0, 196617, 851989, 0, 196617, 851990, 0, 196617, 851991, 0, 196617, 851992, 0, 196617, 851993, 0, 196617, 851994, 0, 196617, 851995, 0, 196617, 851996, 0, 196617, 851997, 0, 196617, 851998, 0, 196617, 851999, 0, 196617, 852000, 0, 196617, 852001, 0, 196617, 852002, 0, 196617, 852003, 0, 196617, 852004, 0, 196617, 852005, 0, 196617, 852006, 0, 196617, 852007, 0, 196617, 852008, 0, 196617, 852009, 0, 196617, 852010, 0, 196617, 852011, 0, 196617, 852012, 0, 196617, 852013, 0, 196617, 852014, 0, 196617, 852015, 0, 196617, 852016, 0, 196617, 852017, 0, 196617, 852018, 0, 196617, 852019, 0, 196617, 852020, 0, 196617, 852021, 0, 196617, 852022, 0, 196617, 852023, 0, 196617, 852024, 0, 196617, 852025, 0, 196617, 852026, 0, 196617, 852027, 0, 196617, 852028, 0, 196619 ) +tile_data = PoolIntArray( -3, 0, 8, -2, 0, 10, -1, 0, 10, -65536, 0, 10, -65535, 0, 10, -65534, 0, 10, -65533, 0, 10, -65532, 0, 10, -65531, 0, 10, -65530, 0, 10, -65529, 0, 10, -65528, 0, 10, -65527, 0, 10, -65526, 0, 10, -65525, 0, 10, -65524, 0, 10, -65523, 0, 10, -65522, 0, 10, -65521, 0, 10, -65520, 0, 10, -65519, 0, 10, -65518, 0, 10, -65517, 0, 10, -65516, 0, 10, -65515, 0, 10, -65514, 0, 10, -65513, 0, 10, -65512, 0, 10, -65511, 0, 10, -65510, 0, 10, -65509, 0, 10, -65508, 0, 10, -65507, 0, 10, -65506, 0, 10, -65505, 0, 10, -65504, 0, 10, -65503, 0, 10, -65502, 0, 10, -65501, 0, 10, -65500, 0, 10, -65499, 0, 10, -65498, 0, 10, -65497, 0, 10, -65496, 0, 10, -65495, 0, 10, -65494, 0, 10, -65493, 0, 10, -65492, 0, 10, -65491, 0, 10, -65490, 0, 10, -65489, 0, 10, -65488, 0, 10, -65487, 0, 10, -65486, 0, 10, -65485, 0, 10, -65484, 0, 10, -65483, 0, 10, -65482, 0, 10, -65481, 0, 10, -65480, 0, 10, -65479, 0, 10, -65478, 0, 10, -65477, 0, 10, -65476, 0, 10, -65475, 0, 10, -65474, 0, 10, -65473, 0, 10, -65472, 0, 10, -65471, 0, 10, -65470, 0, 10, -65469, 0, 10, -65468, 0, 10, -65467, 0, 10, -65466, 0, 10, -65465, 0, 10, -65464, 0, 10, -65463, 0, 10, -65462, 0, 10, -65461, 0, 10, -65460, 0, 10, -65459, 0, 10, -65458, 0, 10, -65457, 0, 10, -65456, 0, 10, -65455, 0, 10, -65454, 0, 10, -65453, 0, 10, -65452, 0, 10, -65451, 0, 10, -65450, 0, 10, -65449, 0, 10, -65448, 0, 10, -65447, 0, 10, -65446, 0, 10, -65445, 0, 10, -65444, 0, 10, -65443, 0, 10, -65442, 0, 10, -65441, 0, 10, -65440, 0, 10, -65439, 0, 10, -65438, 0, 10, -65437, 0, 10, -65436, 0, 10, -65435, 0, 10, -65434, 0, 10, -65433, 0, 10, -65432, 0, 10, -65431, 0, 10, -65430, 0, 10, -65429, 0, 10, -65428, 0, 10, -65427, 0, 10, -65426, 0, 10, -65425, 0, 10, -65424, 0, 10, -65423, 0, 10, -65422, 0, 10, -65421, 0, 10, -65420, 0, 10, -65419, 0, 10, -65418, 0, 10, -65417, 0, 10, -65416, 0, 10, -65415, 0, 10, -65414, 0, 10, -65413, 0, 10, -65412, 0, 10, -65411, 0, 10, -65410, 0, 10, -65409, 0, 10, -65408, 0, 10, -65407, 0, 10, -65406, 0, 10, -65405, 0, 10, -65404, 0, 10, -65403, 0, 10, -65402, 0, 10, -65401, 0, 10, -65400, 0, 10, -65399, 0, 10, -65398, 0, 10, -65397, 0, 10, -65396, 0, 10, -65395, 0, 10, -65394, 0, 10, -65393, 0, 10, -65392, 0, 11, 65533, 0, 65544, 65534, 0, 131081, 65535, 0, 131081, 0, 0, 131081, 1, 0, 131081, 2, 0, 131081, 3, 0, 131081, 4, 0, 131081, 5, 0, 131081, 6, 0, 131081, 7, 0, 131081, 8, 0, 131081, 9, 0, 131081, 10, 0, 131081, 11, 0, 131081, 12, 0, 131081, 13, 0, 131081, 14, 0, 131081, 15, 0, 131081, 16, 0, 131081, 17, 0, 131081, 18, 0, 131081, 19, 0, 131081, 20, 0, 131081, 21, 0, 131081, 22, 0, 131081, 23, 0, 131081, 24, 0, 131081, 25, 0, 131081, 26, 0, 131081, 27, 0, 131081, 28, 0, 131081, 29, 0, 131081, 30, 0, 131081, 31, 0, 131081, 32, 0, 131081, 33, 0, 131081, 34, 0, 131081, 35, 0, 131081, 36, 0, 131081, 37, 0, 131081, 38, 0, 131081, 39, 0, 131081, 40, 0, 131081, 41, 0, 131081, 42, 0, 131081, 43, 0, 131081, 44, 0, 131081, 45, 0, 131081, 46, 0, 131081, 47, 0, 131081, 48, 0, 131081, 49, 0, 131081, 50, 0, 131081, 51, 0, 131081, 52, 0, 131081, 53, 0, 131081, 54, 0, 131081, 55, 0, 131081, 56, 0, 131081, 57, 0, 131081, 58, 0, 131081, 59, 0, 131081, 60, 0, 131081, 61, 0, 131081, 62, 0, 131081, 63, 0, 131081, 64, 0, 131081, 65, 0, 131081, 66, 0, 131081, 67, 0, 131081, 68, 0, 131081, 69, 0, 131081, 70, 0, 131081, 71, 0, 131081, 72, 0, 131081, 73, 0, 131081, 74, 0, 131081, 75, 0, 131081, 76, 0, 131081, 77, 0, 131081, 78, 0, 131081, 79, 0, 131081, 80, 0, 131081, 81, 0, 131081, 82, 0, 131081, 83, 0, 131081, 84, 0, 131081, 85, 0, 131081, 86, 0, 131081, 87, 0, 131081, 88, 0, 131081, 89, 0, 131081, 90, 0, 131081, 91, 0, 131081, 92, 0, 131081, 93, 0, 131081, 94, 0, 131081, 95, 0, 131081, 96, 0, 131081, 97, 0, 131081, 98, 0, 131081, 99, 0, 131081, 100, 0, 131081, 101, 0, 131081, 102, 0, 131081, 103, 0, 131081, 104, 0, 131081, 105, 0, 131081, 106, 0, 131081, 107, 0, 131081, 108, 0, 131081, 109, 0, 131081, 110, 0, 131081, 111, 0, 131081, 112, 0, 131081, 113, 0, 131081, 114, 0, 131081, 115, 0, 131081, 116, 0, 131081, 117, 0, 131078, 118, 0, 196617, 119, 0, 196617, 120, 0, 196617, 121, 0, 196617, 122, 0, 196617, 123, 0, 196617, 124, 0, 196617, 125, 0, 196617, 126, 0, 196617, 127, 0, 196617, 128, 0, 196617, 129, 0, 196617, 130, 0, 196617, 131, 0, 196617, 132, 0, 196617, 133, 0, 196617, 134, 0, 196617, 135, 0, 196617, 136, 0, 196617, 137, 0, 196617, 138, 0, 196617, 139, 0, 196617, 140, 0, 196617, 141, 0, 196617, 142, 0, 196617, 143, 0, 131077, 144, 0, 131083, 131069, 0, 65544, 131070, 0, 131081, 131071, 0, 131078, 65536, 0, 196617, 65537, 0, 196617, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 196617, 65556, 0, 196617, 65557, 0, 196617, 65558, 0, 196617, 65559, 0, 196617, 65560, 0, 196617, 65561, 0, 196617, 65562, 0, 196617, 65563, 0, 196617, 65564, 0, 196617, 65565, 0, 196617, 65566, 0, 196617, 65567, 0, 196617, 65568, 0, 196617, 65569, 0, 196617, 65570, 0, 196617, 65571, 0, 196617, 65572, 0, 196617, 65573, 0, 196617, 65574, 0, 196617, 65575, 0, 196617, 65576, 0, 196617, 65577, 0, 196617, 65578, 0, 196617, 65579, 0, 196617, 65580, 0, 196617, 65581, 0, 196617, 65582, 0, 196617, 65583, 0, 131077, 65584, 0, 131081, 65585, 0, 131081, 65586, 0, 131081, 65587, 0, 131081, 65588, 0, 131081, 65589, 0, 131078, 65590, 0, 196617, 65591, 0, 196617, 65592, 0, 196617, 65593, 0, 196617, 65594, 0, 196617, 65595, 0, 196617, 65596, 0, 196617, 65597, 0, 196617, 65598, 0, 196617, 65599, 0, 196617, 65600, 0, 196617, 65601, 0, 196617, 65602, 0, 196617, 65603, 0, 196617, 65604, 0, 196617, 65605, 0, 196617, 65606, 0, 196617, 65607, 0, 196617, 65608, 0, 196617, 65609, 0, 196617, 65610, 0, 196617, 65611, 0, 196617, 65612, 0, 196617, 65613, 0, 196617, 65614, 0, 196617, 65615, 0, 196617, 65616, 0, 196617, 65617, 0, 196617, 65618, 0, 196617, 65619, 0, 196617, 65620, 0, 196617, 65621, 0, 196617, 65622, 0, 196617, 65623, 0, 196617, 65624, 0, 196617, 65625, 0, 196617, 65626, 0, 196617, 65627, 0, 196617, 65628, 0, 196617, 65629, 0, 196617, 65630, 0, 196617, 65631, 0, 196617, 65632, 0, 196617, 65633, 0, 196617, 65634, 0, 196617, 65635, 0, 196617, 65636, 0, 196617, 65637, 0, 196617, 65638, 0, 196617, 65639, 0, 196617, 65640, 0, 196617, 65641, 0, 196617, 65642, 0, 196617, 65643, 0, 196617, 65644, 0, 196617, 65645, 0, 196617, 65646, 0, 196617, 65647, 0, 196617, 65648, 0, 196617, 65649, 0, 196617, 65650, 0, 196617, 65651, 0, 196617, 65652, 0, 131077, 65653, 0, 131083, 65679, 0, 65544, 65680, 0, 131083, 196605, 0, 65544, 196606, 0, 131081, 196607, 0, 131083, 131119, 0, 65544, 131120, 0, 131081, 131121, 0, 131081, 131122, 0, 131081, 131123, 0, 131081, 131124, 0, 131078, 131125, 0, 196619, 131188, 0, 65544, 131189, 0, 65547, 131190, 0, 196611, 131215, 0, 65544, 131216, 0, 131083, 262141, 0, 65544, 262142, 0, 131081, 262143, 0, 131083, 196655, 0, 65544, 196656, 0, 131081, 196657, 0, 131081, 196658, 0, 131081, 196659, 0, 131078, 196660, 0, 196619, 196724, 0, 65544, 196725, 0, 131083, 196751, 0, 65544, 196752, 0, 131083, 327677, 0, 65544, 327678, 0, 131081, 327679, 0, 131083, 262191, 0, 65544, 262192, 0, 131081, 262193, 0, 131081, 262194, 0, 131078, 262195, 0, 196619, 262260, 0, 65544, 262261, 0, 65547, 262262, 0, 196611, 262287, 0, 65544, 262288, 0, 131083, 393213, 0, 65544, 393214, 0, 131081, 393215, 0, 131083, 327727, 0, 65544, 327728, 0, 131081, 327729, 0, 131078, 327730, 0, 196619, 327796, 0, 65544, 327797, 0, 131083, 327823, 0, 65544, 327824, 0, 131083, 458749, 0, 65544, 458750, 0, 131081, 458751, 0, 131083, 393263, 0, 65544, 393264, 0, 131078, 393265, 0, 196619, 393332, 0, 65544, 393333, 0, 65547, 393334, 0, 196611, 393359, 0, 65544, 393360, 0, 131083, 524285, 0, 65544, 524286, 0, 131081, 524287, 0, 131083, 458799, 0, 196616, 458800, 0, 196619, 458868, 0, 65544, 458869, 0, 131083, 458895, 0, 65544, 458896, 0, 131083, 589821, 0, 65544, 589822, 0, 131081, 589823, 0, 131083, 524404, 0, 65544, 524405, 0, 65547, 524406, 0, 196611, 524431, 0, 65544, 524432, 0, 131083, 655357, 0, 65544, 655358, 0, 131081, 655359, 0, 131083, 589866, 0, 0, 589940, 0, 196616, 589941, 0, 196619, 589967, 0, 65544, 589968, 0, 131083, 720893, 0, 65544, 720894, 0, 131081, 720895, 0, 131083, 655395, 0, 0, 655400, 0, 0, 655402, 0, 65536, 655503, 0, 65544, 655504, 0, 131083, 786429, 0, 65544, 786430, 0, 131081, 786431, 0, 65542, 720896, 0, 10, 720897, 0, 10, 720898, 0, 10, 720899, 0, 10, 720900, 0, 10, 720901, 0, 10, 720902, 0, 10, 720903, 0, 10, 720904, 0, 10, 720905, 0, 10, 720906, 0, 10, 720907, 0, 10, 720908, 0, 10, 720909, 0, 10, 720910, 0, 10, 720911, 0, 10, 720912, 0, 10, 720913, 0, 10, 720914, 0, 10, 720915, 0, 10, 720916, 0, 10, 720917, 0, 10, 720918, 0, 10, 720919, 0, 10, 720920, 0, 10, 720921, 0, 10, 720922, 0, 10, 720923, 0, 10, 720924, 0, 10, 720925, 0, 11, 720928, 0, 0, 720931, 0, 65536, 720934, 0, 0, 720936, 0, 65536, 720938, 0, 65536, 720940, 0, 0, 720943, 0, 8, 720944, 0, 10, 720945, 0, 10, 720946, 0, 10, 720947, 0, 10, 720948, 0, 10, 720949, 0, 10, 720950, 0, 10, 720951, 0, 10, 720952, 0, 10, 720953, 0, 10, 720954, 0, 10, 720955, 0, 10, 720956, 0, 10, 720957, 0, 10, 720958, 0, 10, 720959, 0, 10, 720960, 0, 10, 720961, 0, 10, 720962, 0, 10, 720963, 0, 10, 720964, 0, 10, 720965, 0, 10, 720966, 0, 10, 720967, 0, 10, 720968, 0, 10, 720969, 0, 10, 720970, 0, 10, 720971, 0, 10, 720972, 0, 10, 720973, 0, 10, 720974, 0, 10, 720975, 0, 11, 720982, 0, 8, 720983, 0, 10, 720984, 0, 10, 720985, 0, 10, 720986, 0, 10, 720987, 0, 10, 720988, 0, 10, 720989, 0, 10, 720990, 0, 11, 720992, 0, 8, 720993, 0, 10, 720994, 0, 10, 720995, 0, 10, 720996, 0, 10, 720997, 0, 10, 720998, 0, 10, 720999, 0, 10, 721000, 0, 10, 721001, 0, 10, 721002, 0, 10, 721003, 0, 10, 721004, 0, 10, 721005, 0, 10, 721006, 0, 10, 721007, 0, 10, 721008, 0, 10, 721009, 0, 10, 721010, 0, 10, 721011, 0, 10, 721012, 0, 10, 721013, 0, 10, 721014, 0, 10, 721015, 0, 10, 721016, 0, 10, 721017, 0, 10, 721018, 0, 10, 721019, 0, 10, 721020, 0, 10, 721021, 0, 10, 721022, 0, 10, 721023, 0, 10, 721024, 0, 10, 721025, 0, 10, 721026, 0, 10, 721027, 0, 10, 721028, 0, 10, 721029, 0, 10, 721030, 0, 10, 721031, 0, 10, 721032, 0, 10, 721033, 0, 10, 721034, 0, 10, 721035, 0, 10, 721036, 0, 10, 721037, 0, 10, 721038, 0, 10, 721039, 0, 65541, 721040, 0, 131083, 851965, 0, 196616, 851966, 0, 196617, 851967, 0, 196617, 786432, 0, 196617, 786433, 0, 196617, 786434, 0, 196617, 786435, 0, 196617, 786436, 0, 196617, 786437, 0, 196617, 786438, 0, 196617, 786439, 0, 196617, 786440, 0, 196617, 786441, 0, 196617, 786442, 0, 196617, 786443, 0, 196617, 786444, 0, 196617, 786445, 0, 196617, 786446, 0, 196617, 786447, 0, 196617, 786448, 0, 196617, 786449, 0, 196617, 786450, 0, 196617, 786451, 0, 196617, 786452, 0, 196617, 786453, 0, 196617, 786454, 0, 196617, 786455, 0, 196617, 786456, 0, 196617, 786457, 0, 196617, 786458, 0, 196617, 786459, 0, 196617, 786460, 0, 196617, 786461, 0, 196619, 786464, 0, 131072, 786467, 0, 131072, 786470, 0, 131072, 786472, 0, 131072, 786474, 0, 131072, 786476, 0, 131072, 786479, 0, 196616, 786480, 0, 196617, 786481, 0, 196617, 786482, 0, 196617, 786483, 0, 196617, 786484, 0, 196617, 786485, 0, 196617, 786486, 0, 196617, 786487, 0, 196617, 786488, 0, 196617, 786489, 0, 196617, 786490, 0, 196617, 786491, 0, 196617, 786492, 0, 196617, 786493, 0, 196617, 786494, 0, 196617, 786495, 0, 196617, 786496, 0, 196617, 786497, 0, 196617, 786498, 0, 196617, 786499, 0, 196617, 786500, 0, 196617, 786501, 0, 196617, 786502, 0, 196617, 786503, 0, 196617, 786504, 0, 196617, 786505, 0, 196617, 786506, 0, 196617, 786507, 0, 196617, 786508, 0, 196617, 786509, 0, 196617, 786510, 0, 196617, 786511, 0, 196619, 786518, 0, 196616, 786519, 0, 196617, 786520, 0, 196617, 786521, 0, 196617, 786522, 0, 196617, 786523, 0, 196617, 786524, 0, 196617, 786525, 0, 196617, 786526, 0, 196619, 786528, 0, 196616, 786529, 0, 196617, 786530, 0, 196617, 786531, 0, 196617, 786532, 0, 196617, 786533, 0, 196617, 786534, 0, 196617, 786535, 0, 196617, 786536, 0, 196617, 786537, 0, 196617, 786538, 0, 196617, 786539, 0, 196617, 786540, 0, 196617, 786541, 0, 196617, 786542, 0, 196617, 786543, 0, 196617, 786544, 0, 196617, 786545, 0, 196617, 786546, 0, 196617, 786547, 0, 196617, 786548, 0, 196617, 786549, 0, 196617, 786550, 0, 196617, 786551, 0, 196617, 786552, 0, 196617, 786553, 0, 196617, 786554, 0, 196617, 786555, 0, 196617, 786556, 0, 196617, 786557, 0, 196617, 786558, 0, 196617, 786559, 0, 196617, 786560, 0, 196617, 786561, 0, 196617, 786562, 0, 196617, 786563, 0, 196617, 786564, 0, 196617, 786565, 0, 196617, 786566, 0, 196617, 786567, 0, 196617, 786568, 0, 196617, 786569, 0, 196617, 786570, 0, 196617, 786571, 0, 196617, 786572, 0, 196617, 786573, 0, 196617, 786574, 0, 196617, 786575, 0, 196617, 786576, 0, 196619 ) -[node name="Node" type="Node" parent="."] - -[node name="torch" parent="Node" instance=ExtResource( 4 )] -position = Vector2( 64, 112 ) - -[node name="torch2" parent="Node" instance=ExtResource( 4 )] -position = Vector2( 208, 64 ) - -[node name="torch3" parent="Node" instance=ExtResource( 4 )] -position = Vector2( 400, 64 ) - -[node name="torch4" parent="Node" instance=ExtResource( 4 )] -position = Vector2( 608, 64 ) - -[node name="torch6" parent="Node" instance=ExtResource( 4 )] -position = Vector2( 880, 64 ) - -[node name="torch5" parent="Node" instance=ExtResource( 4 )] -position = Vector2( 752, 64 ) +[node name="Skeleton Enemy" parent="TileMap" instance=ExtResource( 5 )] +position = Vector2( 1582, 161 ) [node name="Player" parent="." instance=ExtResource( 2 )] position = Vector2( 108, 164 ) +[node name="Enemies" type="Node" parent="."] + +[node name="Demon" parent="Enemies" instance=ExtResource( 4 )] +position = Vector2( 952, 163 ) + +[node name="Skeleton Enemy" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 295, 165 ) + +[node name="Ogre" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 330, 171 ) + +[node name="Skeleton Enemy2" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 1154, 165 ) + +[node name="Skeleton Enemy3" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 1240, 167 ) + +[node name="Skeleton Enemy4" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 1240, 167 ) + +[node name="Demon2" parent="Enemies" instance=ExtResource( 4 )] +position = Vector2( 1385, 167 ) + +[node name="Ogre3" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 1660, 173 ) + +[node name="Demon3" parent="Enemies" instance=ExtResource( 4 )] +position = Vector2( 1896, 87 ) + +[node name="Demon4" parent="Enemies" instance=ExtResource( 4 )] +position = Vector2( 1896, 20 ) + +[node name="Ogre2" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 1198, 169 ) + +[node name="Ogre4" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 2162, 166 ) + +[node name="Ogre5" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 2097, 167 ) + +[node name="Ogre6" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 2209, 170 ) + +[node name="Ogre7" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 2027, 168 ) + +[node name="Ogre8" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 2054, 168 ) + +[node name="Ogre9" parent="Enemies" instance=ExtResource( 6 )] +position = Vector2( 2128, 167 ) + +[node name="Skeleton Enemy5" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 1895, 120 ) + +[node name="Skeleton Enemy6" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 1893, 55 ) + +[node name="Skeleton Enemy7" parent="Enemies" instance=ExtResource( 5 )] +position = Vector2( 1893, 55 ) + [node name="Area2D" type="Area2D" parent="."] script = ExtResource( 7 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2( 1610, 259 ) +position = Vector2( 1603, 241 ) shape = SubResource( 1 ) - -[node name="Skeleton Enemy" parent="." instance=ExtResource( 5 )] -position = Vector2( 843, 85 ) -max_range = 999999 -stationary = true - -[node name="CanvasModulate" type="CanvasModulate" parent="."] -color = Color( 0.564706, 0.564706, 0.564706, 1 ) - -[node name="StaticBody2D" type="StaticBody2D" parent="."] -position = Vector2( 843, 64 ) -collision_layer = 0 -collision_mask = 4 - -[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] -position = Vector2( -20, 0 ) -shape = SubResource( 2 ) [connection signal="body_entered" from="Area2D" to="Area2D" method="_on_Area2D_body_entered"] diff --git a/levels/Campaign/Level 3/Area2D.gd b/levels/Campaign/Level 3/Area2D.gd index efae0c1..90b91e8 100644 --- a/levels/Campaign/Level 3/Area2D.gd +++ b/levels/Campaign/Level 3/Area2D.gd @@ -1,23 +1,23 @@ -extends Area2D - - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass - - -func _on_Area2D_body_entered(body): - if body.has_method("get_type") and body.get_type() == "player": - get_tree().change_scene("res://Title/Death Screen'.tscn") - else: - print("hi") +extends Area2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + + +func _on_Area2D_body_entered(body): + if body.has_method("get_type") and body.get_type() == "player": + get_tree().change_scene("res://Title/Death Screen'.tscn") + else: + print("hi") diff --git a/levels/Campaign/Level 3/Level 3.tscn b/levels/Campaign/Level 3/Level_3.tscn similarity index 99% rename from levels/Campaign/Level 3/Level 3.tscn rename to levels/Campaign/Level 3/Level_3.tscn index 26d1219..a45586a 100644 --- a/levels/Campaign/Level 3/Level 3.tscn +++ b/levels/Campaign/Level 3/Level_3.tscn @@ -95,7 +95,7 @@ script = ExtResource( 11 ) position = Vector2( 1120, 72 ) [node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 35, 219 ) +position = Vector2( 431.5, 202 ) [node name="Area2D" type="Area2D" parent="."] script = ExtResource( 3 ) @@ -133,9 +133,6 @@ shape = SubResource( 2 ) position = Vector2( -49, -9 ) shape = SubResource( 2 ) -[node name="Demon" parent="StaticBody2D" instance=ExtResource( 10 )] -position = Vector2( -316, 225 ) - [node name="Ogre" parent="." instance=ExtResource( 7 )] position = Vector2( 800, -52 ) @@ -150,6 +147,9 @@ position = Vector2( 717, 119 ) [node name="CanvasModulate" type="CanvasModulate" parent="."] color = Color( 0.564706, 0.564706, 0.564706, 1 ) -[connection signal="on" from="Lever" to="TileMapAppearing" method="_on_Lever_on"] + +[node name="Demon" parent="." instance=ExtResource( 10 )] +position = Vector2( 668, 135.5 ) [connection signal="on" from="Lever" to="TileMapDisapearing" method="_on_Lever_on"] +[connection signal="on" from="Lever" to="TileMapAppearing" method="_on_Lever_on"] [connection signal="body_entered" from="Area2D" to="Area2D" method="_on_Area2D_body_entered"] diff --git a/levels/Campaign/Level 3/TileMap2.gd b/levels/Campaign/Level 3/TileMap2.gd index 4bc9719..2171a4d 100644 --- a/levels/Campaign/Level 3/TileMap2.gd +++ b/levels/Campaign/Level 3/TileMap2.gd @@ -1,8 +1,8 @@ -extends TileMap - -func _on_Lever_on(): - $AnimationPlayer.play("Appearing Platform") - - -func _on_Lever_off(): - queue_free() +extends TileMap + +func _on_Lever_on(): + $AnimationPlayer.play("Appearing Platform") + + +func _on_Lever_off(): + queue_free()