diff --git a/assets/Traps/arrow.png b/assets/Traps/arrow.png new file mode 100644 index 0000000..2e1b417 Binary files /dev/null and b/assets/Traps/arrow.png differ diff --git a/assets/Traps/arrow.png.import b/assets/Traps/arrow.png.import new file mode 100644 index 0000000..8c1653a --- /dev/null +++ b/assets/Traps/arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/arrow.png-6ef2cedb65ee67b68492baae0a925137.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Traps/arrow.png" +dest_files=[ "res://.import/arrow.png-6ef2cedb65ee67b68492baae0a925137.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/Traps/mask_trap.gif b/assets/Traps/mask_trap.gif new file mode 100644 index 0000000..7d2f3ea Binary files /dev/null and b/assets/Traps/mask_trap.gif differ diff --git a/assets/Traps/mask_trap.png b/assets/Traps/mask_trap.png new file mode 100644 index 0000000..f52164a Binary files /dev/null and b/assets/Traps/mask_trap.png differ diff --git a/assets/Traps/mask_trap.png.import b/assets/Traps/mask_trap.png.import new file mode 100644 index 0000000..9f1e4ca --- /dev/null +++ b/assets/Traps/mask_trap.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/mask_trap.png-818f650db1c37c9c6869abab749ce2d9.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Traps/mask_trap.png" +dest_files=[ "res://.import/mask_trap.png-818f650db1c37c9c6869abab749ce2d9.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/GameWorld/Levels/PreGame.tscn b/src/GameWorld/Levels/PreGame.tscn index dd16423..d3a5530 100644 --- a/src/GameWorld/Levels/PreGame.tscn +++ b/src/GameWorld/Levels/PreGame.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=28 format=2] +[gd_scene load_steps=29 format=2] [ext_resource path="res://src/GameWorld/Levels/PreGame.gd" type="Script" id=1] [ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=2] @@ -19,6 +19,7 @@ [ext_resource path="res://src/Items/Spring.tscn" type="PackedScene" id=17] [ext_resource path="res://src/Hazards/Stomp.tscn" type="PackedScene" id=18] [ext_resource path="res://src/Items/BrakableVase.tscn" type="PackedScene" id=19] +[ext_resource path="res://src/Hazards/MaskTrap.tscn" type="PackedScene" id=20] [sub_resource type="TileSet" id=1] 0/name = "tileset.png 0" @@ -211,7 +212,7 @@ tile_data = PoolIntArray( -65513, 0, 0, -65512, 0, 1, -65511, 0, 131076, -65510, [node name="SolidsTileMap" parent="SolidPlatforms" instance=ExtResource( 12 )] collision_layer = 8 -tile_data = PoolIntArray( -196613, 0, 0, -196612, 0, 1, -196611, 0, 1, -196610, 0, 131076, -196609, 0, 1, -262144, 0, 1, -262143, 0, 131076, -262142, 0, 1, -262141, 0, 1, -262140, 0, 131076, -262139, 0, 131076, -262138, 0, 1, -262137, 0, 131076, -262136, 0, 131076, -262135, 0, 131076, -262134, 0, 1, -262133, 0, 131076, -262132, 0, 131076, -262131, 0, 131076, -262130, 0, 1, -262129, 0, 1, -262128, 0, 1, -262127, 0, 1, -262126, 0, 1, -262125, 0, 1, -262124, 0, 131076, -262123, 0, 131076, -262122, 0, 131076, -262121, 0, 131076, -262120, 0, 1, -262119, 0, 1, -262118, 0, 131076, -262117, 0, 131076, -262116, 0, 1, -262115, 0, 131076, -262114, 0, 1, -262113, 0, 1, -262112, 0, 1, -262111, 0, 1, -262110, 0, 1, -262109, 0, 131076, -262108, 0, 1, -262107, 0, 1, -262106, 0, 1, -262105, 0, 131076, -262104, 0, 1, -262103, 0, 131076, -262102, 0, 1, -262101, 0, 131076, -262100, 0, 2, -131077, 0, 65541, -131076, 0, 65537, -131075, 0, 65537, -131074, 0, 65537, -131073, 0, 3, -196608, 0, 131073, -196607, 0, 4, -196606, 0, 4, -196605, 0, 131073, -196604, 0, 4, -196603, 0, 131073, -196602, 0, 4, -196601, 0, 4, -196600, 0, 4, -196599, 0, 4, -196598, 0, 131073, -196597, 0, 4, -196596, 0, 4, -196595, 0, 131073, -196594, 0, 131073, -196593, 0, 131073, -196592, 0, 131073, -196591, 0, 4, -196590, 0, 5, -196589, 0, 65537, -196588, 0, 65537, -196587, 0, 65537, -196586, 0, 65537, -196585, 0, 65537, -196584, 0, 65537, -196583, 0, 65537, -196582, 0, 65537, -196581, 0, 65537, -196580, 0, 65537, -196579, 0, 65537, -196578, 0, 65537, -196577, 0, 65537, -196576, 0, 65537, -196575, 0, 65537, -196574, 0, 65537, -196573, 0, 65537, -196572, 0, 65537, -196571, 0, 65537, -196570, 0, 65537, -196569, 0, 65537, -196568, 0, 65537, -196567, 0, 65537, -196566, 0, 65537, -196565, 0, 65537, -196564, 0, 65538, -65541, 0, 65536, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65538, -131054, 0, 65536, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537, -131039, 0, 65537, -131038, 0, 65537, -131037, 0, 65537, -131036, 0, 65537, -131035, 0, 65537, -131034, 0, 65537, -131033, 0, 65537, -131032, 0, 65537, -131031, 0, 65537, -131030, 0, 65537, -131029, 0, 65537, -131028, 0, 65538, -5, 0, 65536, -4, 0, 65537, -3, 0, 65537, -2, 0, 65537, -1, 0, 65539, -65518, 0, 65536, -65517, 0, 65537, -65516, 0, 65537, -65515, 0, 65537, -65514, 0, 65537, -65513, 0, 65537, -65512, 0, 65537, -65511, 0, 65537, -65510, 0, 65537, -65509, 0, 65537, -65508, 0, 65537, -65507, 0, 65537, -65506, 0, 65537, -65505, 0, 65537, -65504, 0, 65537, -65503, 0, 65537, -65502, 0, 65537, -65501, 0, 65537, -65500, 0, 65537, -65499, 0, 65537, -65498, 0, 65537, -65497, 0, 65537, -65496, 0, 65537, -65495, 0, 65537, -65494, 0, 65537, -65493, 0, 65537, -65492, 0, 65538, 65531, 0, 65536, 65532, 0, 65537, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 131075, 0, 0, 1, 1, 0, 131076, 2, 0, 2, 18, 0, 65541, 19, 0, 65537, 20, 0, 65537, 21, 0, 65537, 22, 0, 65537, 23, 0, 65537, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65537, 38, 0, 65537, 39, 0, 65537, 40, 0, 65537, 41, 0, 65537, 42, 0, 65537, 43, 0, 65537, 44, 0, 65538, 131067, 0, 65536, 131068, 0, 65537, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65538, 65554, 0, 131072, 65555, 0, 4, 65556, 0, 131073, 65557, 0, 131073, 65558, 0, 131073, 65559, 0, 5, 65560, 0, 65537, 65561, 0, 3, 65562, 0, 4, 65563, 0, 4, 65564, 0, 131073, 65565, 0, 4, 65566, 0, 4, 65567, 0, 5, 65568, 0, 3, 65569, 0, 4, 65570, 0, 131073, 65571, 0, 4, 65572, 0, 4, 65573, 0, 4, 65574, 0, 4, 65575, 0, 4, 65576, 0, 131073, 65577, 0, 131073, 65578, 0, 5, 65579, 0, 65537, 65580, 0, 65538, 196603, 0, 65536, 196604, 0, 65537, 196605, 0, 65537, 196606, 0, 65537, 196607, 0, 65537, 131072, 0, 65537, 131073, 0, 65537, 131074, 0, 65538, 131095, 0, 131072, 131096, 0, 4, 131097, 0, 131074, 131103, 0, 65541, 131104, 0, 65539, 131114, 0, 65541, 131115, 0, 65537, 131116, 0, 65538, 262139, 0, 65536, 262140, 0, 65537, 262141, 0, 65537, 262142, 0, 65537, 262143, 0, 65537, 196608, 0, 65537, 196609, 0, 65537, 196610, 0, 65538, 196639, 0, 65541, 196640, 0, 65538, 196650, 0, 65536, 196651, 0, 65537, 196652, 0, 65538, 327675, 0, 65536, 327676, 0, 65537, 327677, 0, 65537, 327678, 0, 65537, 327679, 0, 65537, 262144, 0, 65537, 262145, 0, 65537, 262146, 0, 131075, 262147, 0, 1, 262148, 0, 131076, 262149, 0, 1, 262150, 0, 131076, 262151, 0, 131076, 262152, 0, 131076, 262153, 0, 2, 262175, 0, 65536, 262176, 0, 65539, 262186, 0, 65541, 262187, 0, 65537, 262188, 0, 65539, 393211, 0, 65536, 393212, 0, 65537, 393213, 0, 65537, 393214, 0, 65537, 393215, 0, 3, 327680, 0, 131073, 327681, 0, 4, 327682, 0, 131073, 327683, 0, 131073, 327684, 0, 4, 327685, 0, 4, 327686, 0, 4, 327687, 0, 4, 327688, 0, 5, 327689, 0, 65539, 327711, 0, 131072, 327712, 0, 131074, 327722, 0, 65541, 327723, 0, 65537, 327724, 0, 65538, 458747, 0, 65541, 458748, 0, 65537, 458749, 0, 65537, 458750, 0, 65537, 458751, 0, 65539, 393224, 0, 65536, 393225, 0, 65538, 393258, 0, 65536, 393259, 0, 65537, 393260, 0, 65538, 524283, 0, 65536, 524284, 0, 65537, 524285, 0, 65537, 524286, 0, 65537, 524287, 0, 65539, 458760, 0, 65536, 458761, 0, 131075, 458762, 0, 131076, 458763, 0, 2, 458794, 0, 65541, 458795, 0, 65537, 458796, 0, 65538, 589819, 0, 65541, 589820, 0, 65537, 589821, 0, 65537, 589822, 0, 65537, 589823, 0, 65538, 524296, 0, 65536, 524297, 0, 65537, 524298, 0, 65537, 524299, 0, 131075, 524300, 0, 1, 524301, 0, 1, 524302, 0, 2, 524330, 0, 65541, 524331, 0, 65537, 524332, 0, 65539, 655355, 0, 65536, 655356, 0, 65537, 655357, 0, 65537, 655358, 0, 65537, 655359, 0, 65538, 589832, 0, 131072, 589833, 0, 131073, 589834, 0, 131073, 589835, 0, 4, 589836, 0, 4, 589837, 0, 131073, 589838, 0, 131074, 589866, 0, 65536, 589867, 0, 65537, 589868, 0, 65539, 720891, 0, 65536, 720892, 0, 65537, 720893, 0, 65537, 720894, 0, 65537, 720895, 0, 65538, 655399, 0, 0, 655400, 0, 1, 655401, 0, 1, 655402, 0, 131077, 655403, 0, 65537, 655404, 0, 65538, 786427, 0, 65536, 786428, 0, 65537, 786429, 0, 65537, 786430, 0, 65537, 786431, 0, 65538, 720935, 0, 131072, 720936, 0, 131073, 720937, 0, 4, 720938, 0, 4, 720939, 0, 4, 720940, 0, 131074, 851963, 0, 65541, 851964, 0, 65537, 851965, 0, 65537, 851966, 0, 65537, 851967, 0, 131075, 786432, 0, 2, 786451, 0, 0, 786452, 0, 2, 786466, 0, 0, 786467, 0, 2, 917499, 0, 65536, 917500, 0, 65537, 917501, 0, 65537, 917502, 0, 65537, 917503, 0, 65537, 851968, 0, 65538, 851987, 0, 65541, 851988, 0, 131075, 851989, 0, 2, 852002, 0, 65541, 852003, 0, 65538, 983035, 0, 65541, 983036, 0, 65537, 983037, 0, 65537, 983038, 0, 65537, 983039, 0, 65537, 917504, 0, 65539, 917523, 0, 65536, 917524, 0, 65537, 917525, 0, 131075, 917526, 0, 2, 917538, 0, 65541, 917539, 0, 131075, 917540, 0, 1, 917541, 0, 131076, 917542, 0, 1, 917543, 0, 1, 917544, 0, 1, 917545, 0, 131076, 917546, 0, 131076, 917547, 0, 1, 917548, 0, 131076, 917549, 0, 131076, 917550, 0, 1, 917551, 0, 131076, 917552, 0, 131076, 917553, 0, 131076, 917554, 0, 131076, 917555, 0, 2, 1048571, 0, 65541, 1048572, 0, 65537, 1048573, 0, 65537, 1048574, 0, 65537, 1048575, 0, 65537, 983040, 0, 131075, 983041, 0, 1, 983042, 0, 1, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 131076, 983048, 0, 1, 983049, 0, 131076, 983050, 0, 1, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 1, 983057, 0, 131076, 983058, 0, 1, 983059, 0, 131077, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 131075, 983063, 0, 131076, 983064, 0, 131076, 983065, 0, 1, 983066, 0, 1, 983067, 0, 1, 983068, 0, 131076, 983069, 0, 1, 983070, 0, 131076, 983071, 0, 131076, 983072, 0, 1, 983073, 0, 1, 983074, 0, 131077, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65537, 983085, 0, 65537, 983086, 0, 65537, 983087, 0, 65537, 983088, 0, 65537, 983089, 0, 65537, 983090, 0, 65537, 983091, 0, 65538, 1114107, 0, 65536, 1114108, 0, 65537, 1114109, 0, 65537, 1114110, 0, 65537, 1114111, 0, 65537, 1048576, 0, 65537, 1048577, 0, 65537, 1048578, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1048584, 0, 65537, 1048585, 0, 65537, 1048586, 0, 65537, 1048587, 0, 65537, 1048588, 0, 65537, 1048589, 0, 65537, 1048590, 0, 65537, 1048591, 0, 65537, 1048592, 0, 65537, 1048593, 0, 65537, 1048594, 0, 65537, 1048595, 0, 65537, 1048596, 0, 65537, 1048597, 0, 65537, 1048598, 0, 65537, 1048599, 0, 65537, 1048600, 0, 65537, 1048601, 0, 65537, 1048602, 0, 65537, 1048603, 0, 65537, 1048604, 0, 65537, 1048605, 0, 65537, 1048606, 0, 65537, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65537, 1048614, 0, 65537, 1048615, 0, 65537, 1048616, 0, 65537, 1048617, 0, 65537, 1048618, 0, 65537, 1048619, 0, 65537, 1048620, 0, 65537, 1048621, 0, 65537, 1048622, 0, 65537, 1048623, 0, 65537, 1048624, 0, 65537, 1048625, 0, 65537, 1048626, 0, 65537, 1048627, 0, 65538, 1179643, 0, 131072, 1179644, 0, 131073, 1179645, 0, 4, 1179646, 0, 4, 1179647, 0, 4, 1114112, 0, 4, 1114113, 0, 4, 1114114, 0, 4, 1114115, 0, 131073, 1114116, 0, 4, 1114117, 0, 131073, 1114118, 0, 4, 1114119, 0, 131073, 1114120, 0, 131073, 1114121, 0, 4, 1114122, 0, 131073, 1114123, 0, 4, 1114124, 0, 131073, 1114125, 0, 131073, 1114126, 0, 4, 1114127, 0, 4, 1114128, 0, 4, 1114129, 0, 4, 1114130, 0, 131073, 1114131, 0, 4, 1114132, 0, 4, 1114133, 0, 4, 1114134, 0, 4, 1114135, 0, 131073, 1114136, 0, 4, 1114137, 0, 131073, 1114138, 0, 4, 1114139, 0, 131073, 1114140, 0, 4, 1114141, 0, 131073, 1114142, 0, 4, 1114143, 0, 131073, 1114144, 0, 131073, 1114145, 0, 4, 1114146, 0, 131073, 1114147, 0, 131073, 1114148, 0, 131073, 1114149, 0, 131073, 1114150, 0, 131073, 1114151, 0, 131073, 1114152, 0, 4, 1114153, 0, 4, 1114154, 0, 131073, 1114155, 0, 4, 1114156, 0, 4, 1114157, 0, 131073, 1114158, 0, 4, 1114159, 0, 4, 1114160, 0, 4, 1114161, 0, 4, 1114162, 0, 131073, 1114163, 0, 131074 ) +tile_data = PoolIntArray( -196613, 0, 0, -196612, 0, 1, -196611, 0, 1, -196610, 0, 131076, -196609, 0, 1, -262144, 0, 1, -262143, 0, 131076, -262142, 0, 1, -262141, 0, 1, -262140, 0, 131076, -262139, 0, 131076, -262138, 0, 1, -262137, 0, 131076, -262136, 0, 131076, -262135, 0, 131076, -262134, 0, 1, -262133, 0, 131076, -262132, 0, 131076, -262131, 0, 131076, -262130, 0, 1, -262129, 0, 1, -262128, 0, 1, -262127, 0, 1, -262126, 0, 1, -262125, 0, 1, -262124, 0, 131076, -262123, 0, 131076, -262122, 0, 131076, -262121, 0, 131076, -262120, 0, 1, -262119, 0, 1, -262118, 0, 131076, -262117, 0, 131076, -262116, 0, 1, -262115, 0, 131076, -262114, 0, 1, -262113, 0, 1, -262112, 0, 1, -262111, 0, 1, -262110, 0, 1, -262109, 0, 131076, -262108, 0, 1, -262107, 0, 1, -262106, 0, 1, -262105, 0, 131076, -262104, 0, 1, -262103, 0, 131076, -262102, 0, 1, -262101, 0, 131076, -262100, 0, 2, -131077, 0, 65541, -131076, 0, 65537, -131075, 0, 65537, -131074, 0, 65537, -131073, 0, 3, -196608, 0, 131073, -196607, 0, 4, -196606, 0, 4, -196605, 0, 131073, -196604, 0, 4, -196603, 0, 131073, -196602, 0, 4, -196601, 0, 4, -196600, 0, 4, -196599, 0, 4, -196598, 0, 131073, -196597, 0, 4, -196596, 0, 4, -196595, 0, 131073, -196594, 0, 131073, -196593, 0, 131073, -196592, 0, 131073, -196591, 0, 4, -196590, 0, 5, -196589, 0, 65537, -196588, 0, 65537, -196587, 0, 65537, -196586, 0, 65537, -196585, 0, 65537, -196584, 0, 65537, -196583, 0, 65537, -196582, 0, 65537, -196581, 0, 65537, -196580, 0, 65537, -196579, 0, 65537, -196578, 0, 65537, -196577, 0, 65537, -196576, 0, 65537, -196575, 0, 65537, -196574, 0, 65537, -196573, 0, 65537, -196572, 0, 65537, -196571, 0, 65537, -196570, 0, 65537, -196569, 0, 65537, -196568, 0, 65537, -196567, 0, 65537, -196566, 0, 65537, -196565, 0, 65537, -196564, 0, 65538, -65541, 0, 65536, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65538, -131054, 0, 65536, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537, -131039, 0, 65537, -131038, 0, 65537, -131037, 0, 65537, -131036, 0, 65537, -131035, 0, 65537, -131034, 0, 65537, -131033, 0, 65537, -131032, 0, 65537, -131031, 0, 65537, -131030, 0, 65537, -131029, 0, 65537, -131028, 0, 65538, -5, 0, 65536, -4, 0, 65537, -3, 0, 65537, -2, 0, 65537, -1, 0, 65539, -65518, 0, 65536, -65517, 0, 65537, -65516, 0, 65537, -65515, 0, 65537, -65514, 0, 65537, -65513, 0, 65537, -65512, 0, 65537, -65511, 0, 65537, -65510, 0, 65537, -65509, 0, 65537, -65508, 0, 65537, -65507, 0, 65537, -65506, 0, 65537, -65505, 0, 65537, -65504, 0, 65537, -65503, 0, 65537, -65502, 0, 65537, -65501, 0, 65537, -65500, 0, 65537, -65499, 0, 65537, -65498, 0, 65537, -65497, 0, 65537, -65496, 0, 65537, -65495, 0, 65537, -65494, 0, 65537, -65493, 0, 65537, -65492, 0, 65538, 65531, 0, 65536, 65532, 0, 65537, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 131075, 0, 0, 1, 1, 0, 131076, 2, 0, 2, 18, 0, 65541, 19, 0, 65537, 20, 0, 65537, 21, 0, 65537, 22, 0, 65537, 23, 0, 65537, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65537, 38, 0, 65537, 39, 0, 65537, 40, 0, 65537, 41, 0, 65537, 42, 0, 65537, 43, 0, 65537, 44, 0, 65538, 131067, 0, 65536, 131068, 0, 65537, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65538, 65554, 0, 131072, 65555, 0, 4, 65556, 0, 131073, 65557, 0, 131073, 65558, 0, 131073, 65559, 0, 5, 65560, 0, 65537, 65561, 0, 3, 65562, 0, 4, 65563, 0, 4, 65564, 0, 131073, 65565, 0, 4, 65566, 0, 4, 65567, 0, 5, 65568, 0, 3, 65569, 0, 4, 65570, 0, 131073, 65571, 0, 4, 65572, 0, 4, 65573, 0, 4, 65574, 0, 4, 65575, 0, 4, 65576, 0, 131073, 65577, 0, 131073, 65578, 0, 5, 65579, 0, 65537, 65580, 0, 65538, 196603, 0, 65536, 196604, 0, 65537, 196605, 0, 65537, 196606, 0, 65537, 196607, 0, 65537, 131072, 0, 65537, 131073, 0, 65537, 131074, 0, 65538, 131095, 0, 131072, 131096, 0, 4, 131097, 0, 131074, 131103, 0, 65541, 131104, 0, 65539, 131114, 0, 65541, 131115, 0, 65537, 131116, 0, 65538, 262139, 0, 65536, 262140, 0, 65537, 262141, 0, 65537, 262142, 0, 65537, 262143, 0, 65537, 196608, 0, 65537, 196609, 0, 65537, 196610, 0, 65538, 196639, 0, 65541, 196640, 0, 65538, 196650, 0, 65536, 196651, 0, 65537, 196652, 0, 65538, 327675, 0, 65536, 327676, 0, 65537, 327677, 0, 65537, 327678, 0, 65537, 327679, 0, 65537, 262144, 0, 65537, 262145, 0, 65537, 262146, 0, 131075, 262147, 0, 1, 262148, 0, 131076, 262149, 0, 1, 262150, 0, 131076, 262151, 0, 131076, 262152, 0, 131076, 262153, 0, 2, 262175, 0, 65536, 262176, 0, 65539, 262186, 0, 65541, 262187, 0, 65537, 262188, 0, 65539, 393211, 0, 65536, 393212, 0, 65537, 393213, 0, 65537, 393214, 0, 65537, 393215, 0, 3, 327680, 0, 131073, 327681, 0, 4, 327682, 0, 131073, 327683, 0, 131073, 327684, 0, 4, 327685, 0, 4, 327686, 0, 4, 327687, 0, 4, 327688, 0, 5, 327689, 0, 65539, 327711, 0, 131072, 327712, 0, 131074, 327722, 0, 65541, 327723, 0, 65537, 327724, 0, 65538, 458747, 0, 65541, 458748, 0, 65537, 458749, 0, 65537, 458750, 0, 65537, 458751, 0, 65539, 393224, 0, 65536, 393225, 0, 65538, 393258, 0, 65536, 393259, 0, 65537, 393260, 0, 65538, 524283, 0, 65536, 524284, 0, 65537, 524285, 0, 65537, 524286, 0, 65537, 524287, 0, 65539, 458760, 0, 65536, 458761, 0, 131075, 458762, 0, 131076, 458763, 0, 2, 458794, 0, 65541, 458795, 0, 65537, 458796, 0, 65538, 589819, 0, 65541, 589820, 0, 65537, 589821, 0, 65537, 589822, 0, 65537, 589823, 0, 65538, 524296, 0, 65536, 524297, 0, 65537, 524298, 0, 65537, 524299, 0, 131075, 524300, 0, 1, 524301, 0, 1, 524302, 0, 2, 524330, 0, 65541, 524331, 0, 65537, 524332, 0, 65539, 655355, 0, 65536, 655356, 0, 65537, 655357, 0, 65537, 655358, 0, 65537, 655359, 0, 65538, 589832, 0, 131072, 589833, 0, 131073, 589834, 0, 131073, 589835, 0, 4, 589836, 0, 4, 589837, 0, 131073, 589838, 0, 131074, 589866, 0, 65536, 589867, 0, 65537, 589868, 0, 65539, 720891, 0, 65536, 720892, 0, 65537, 720893, 0, 65537, 720894, 0, 65537, 720895, 0, 65538, 655399, 0, 0, 655400, 0, 1, 655401, 0, 1, 655402, 0, 131077, 655403, 0, 65537, 655404, 0, 65538, 786427, 0, 65536, 786428, 0, 65537, 786429, 0, 65537, 786430, 0, 65537, 786431, 0, 65538, 720935, 0, 131072, 720936, 0, 131073, 720937, 0, 4, 720938, 0, 4, 720939, 0, 4, 720940, 0, 131074, 851963, 0, 65541, 851964, 0, 65537, 851965, 0, 65537, 851966, 0, 65537, 851967, 0, 131075, 786432, 0, 2, 786451, 0, 0, 786452, 0, 2, 786466, 0, 0, 786467, 0, 2, 917499, 0, 65536, 917500, 0, 65537, 917501, 0, 65537, 917502, 0, 65537, 917503, 0, 65537, 851968, 0, 65538, 851987, 0, 65541, 851988, 0, 131075, 851989, 0, 2, 852002, 0, 65541, 852003, 0, 65538, 983035, 0, 65541, 983036, 0, 65537, 983037, 0, 65537, 983038, 0, 65537, 983039, 0, 65537, 917504, 0, 65539, 917523, 0, 65536, 917524, 0, 65537, 917525, 0, 131075, 917526, 0, 2, 917538, 0, 65541, 917539, 0, 131075, 917540, 0, 1, 917541, 0, 131076, 917542, 0, 1, 917543, 0, 1, 917544, 0, 1, 917545, 0, 131076, 917546, 0, 131076, 917547, 0, 1, 917548, 0, 131076, 917549, 0, 131076, 917550, 0, 1, 917551, 0, 131076, 917552, 0, 131076, 917553, 0, 131076, 917554, 0, 131076, 917555, 0, 2, 1048571, 0, 65541, 1048572, 0, 65537, 1048573, 0, 65537, 1048574, 0, 65537, 1048575, 0, 65537, 983040, 0, 131075, 983041, 0, 1, 983042, 0, 1, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 131076, 983048, 0, 1, 983049, 0, 131076, 983050, 0, 1, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 131076, 983057, 0, 1, 983058, 0, 1, 983059, 0, 131077, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 131075, 983063, 0, 131076, 983064, 0, 131076, 983065, 0, 1, 983066, 0, 1, 983067, 0, 1, 983068, 0, 131076, 983069, 0, 1, 983070, 0, 131076, 983071, 0, 131076, 983072, 0, 1, 983073, 0, 1, 983074, 0, 131077, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65537, 983085, 0, 65537, 983086, 0, 65537, 983087, 0, 65537, 983088, 0, 65537, 983089, 0, 65537, 983090, 0, 65537, 983091, 0, 65538, 1114107, 0, 65536, 1114108, 0, 65537, 1114109, 0, 65537, 1114110, 0, 65537, 1114111, 0, 65537, 1048576, 0, 65537, 1048577, 0, 65537, 1048578, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1048584, 0, 65537, 1048585, 0, 65537, 1048586, 0, 65537, 1048587, 0, 65537, 1048588, 0, 65537, 1048589, 0, 65537, 1048590, 0, 65537, 1048591, 0, 65537, 1048592, 0, 65537, 1048593, 0, 65537, 1048594, 0, 65537, 1048595, 0, 65537, 1048596, 0, 65537, 1048597, 0, 65537, 1048598, 0, 65537, 1048599, 0, 65537, 1048600, 0, 65537, 1048601, 0, 65537, 1048602, 0, 65537, 1048603, 0, 65537, 1048604, 0, 65537, 1048605, 0, 65537, 1048606, 0, 65537, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65537, 1048614, 0, 65537, 1048615, 0, 65537, 1048616, 0, 65537, 1048617, 0, 65537, 1048618, 0, 65537, 1048619, 0, 65537, 1048620, 0, 65537, 1048621, 0, 65537, 1048622, 0, 65537, 1048623, 0, 65537, 1048624, 0, 65537, 1048625, 0, 65537, 1048626, 0, 65537, 1048627, 0, 65538, 1179643, 0, 131072, 1179644, 0, 131073, 1179645, 0, 4, 1179646, 0, 4, 1179647, 0, 4, 1114112, 0, 4, 1114113, 0, 4, 1114114, 0, 4, 1114115, 0, 131073, 1114116, 0, 4, 1114117, 0, 131073, 1114118, 0, 4, 1114119, 0, 131073, 1114120, 0, 131073, 1114121, 0, 4, 1114122, 0, 131073, 1114123, 0, 4, 1114124, 0, 131073, 1114125, 0, 131073, 1114126, 0, 4, 1114127, 0, 4, 1114128, 0, 4, 1114129, 0, 4, 1114130, 0, 131073, 1114131, 0, 4, 1114132, 0, 4, 1114133, 0, 4, 1114134, 0, 4, 1114135, 0, 131073, 1114136, 0, 4, 1114137, 0, 131073, 1114138, 0, 4, 1114139, 0, 131073, 1114140, 0, 4, 1114141, 0, 131073, 1114142, 0, 4, 1114143, 0, 131073, 1114144, 0, 131073, 1114145, 0, 4, 1114146, 0, 131073, 1114147, 0, 131073, 1114148, 0, 131073, 1114149, 0, 131073, 1114150, 0, 131073, 1114151, 0, 131073, 1114152, 0, 4, 1114153, 0, 4, 1114154, 0, 131073, 1114155, 0, 4, 1114156, 0, 4, 1114157, 0, 131073, 1114158, 0, 4, 1114159, 0, 4, 1114160, 0, 4, 1114161, 0, 4, 1114162, 0, 131073, 1114163, 0, 131074 ) [node name="TrapTiles" parent="SolidPlatforms" instance=ExtResource( 10 )] tile_data = PoolIntArray( 589824, 2, 0, 655360, 2, 0, 655368, 1, 0, 655373, 1, 0, 917517, 0, 0, 917530, 0, 0, 917531, 0, 0 ) @@ -300,4 +301,12 @@ loot = ExtResource( 6 ) [node name="BrakableVase3" parent="." instance=ExtResource( 19 )] position = Vector2( 87, 64 ) + +[node name="MaskTrap" parent="." instance=ExtResource( 20 )] +position = Vector2( -2, 131 ) + +[node name="MaskTrap2" parent="." instance=ExtResource( 20 )] +position = Vector2( 304, 222 ) +scale = Vector2( -1, 1 ) +ammo = 2 [connection signal="body_entered" from="CutsceneAreas/OldDudeIntroArea" to="." method="_on_OldDudeIntroArea_body_entered"] diff --git a/src/Hazards/Arrow.gd b/src/Hazards/Arrow.gd new file mode 100644 index 0000000..ee09320 --- /dev/null +++ b/src/Hazards/Arrow.gd @@ -0,0 +1,34 @@ +extends Node2D + +export var speed := 230 + +var _fly := true +var _pin_angle := 0 + +func _ready() -> void: + seed(self.get_instance_id()) + var options = range(-30, 30, 5) + options.shuffle() + _pin_angle = options[0] + +func _physics_process(delta: float) -> void: + if _fly: + position.x += speed * scale.x * delta + +func _on_HitZone_body_entered(body:Node) -> void: + remove_child($HitZone) + if body.name == "Player": + body.die() + _fly = false + $AnimationPlayer.play("fade_out") + + pass + +func _on_PinZone_body_entered(body:Node) -> void: + remove_child($HitZone) + rotation_degrees = _pin_angle + print(rotation_degrees) + _fly = false + yield(get_tree().create_timer(5), "timeout") + $AnimationPlayer.play("fade_out") + pass diff --git a/src/Hazards/Arrow.tscn b/src/Hazards/Arrow.tscn new file mode 100644 index 0000000..0085bd4 --- /dev/null +++ b/src/Hazards/Arrow.tscn @@ -0,0 +1,86 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://assets/Traps/arrow.png" type="Texture" id=1] +[ext_resource path="res://src/Hazards/Arrow.gd" type="Script" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 2.5, 2.5 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 1.5, 1.5 ) + +[sub_resource type="Animation" id=3] +resource_name = "fade_out" +length = 0.2 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:self_modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/1/type = "method" +tracks/1/path = NodePath(".") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0.2 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "queue_free" +} ] +} + +[sub_resource type="Animation" id=4] +resource_name = "idle" +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:self_modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ) ] +} + +[node name="Arrow" type="Node2D"] +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( -7, -1 ) +texture = ExtResource( 1 ) + +[node name="HitZone" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 3 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="HitZone"] +position = Vector2( -2.5, -0.5 ) +shape = SubResource( 1 ) + +[node name="PinZone" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 8 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="PinZone"] +position = Vector2( -6, -0.5 ) +shape = SubResource( 2 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +autoplay = "idle" +anims/fade_out = SubResource( 3 ) +anims/idle = SubResource( 4 ) +[connection signal="body_entered" from="HitZone" to="." method="_on_HitZone_body_entered"] +[connection signal="body_entered" from="PinZone" to="." method="_on_PinZone_body_entered"] diff --git a/src/Hazards/MaskTrap.gd b/src/Hazards/MaskTrap.gd new file mode 100644 index 0000000..7c8817e --- /dev/null +++ b/src/Hazards/MaskTrap.gd @@ -0,0 +1,62 @@ +extends Node2D + + +export var ammo:int = 1 +export var timeout:= 2.0 +export var enabled := true + +var _activated := false +var _can_activate := true +onready var _ammo = ammo +var Arrow = load("res://src/Hazards/Arrow.tscn") + + + +func _physics_process(delta: float) -> void: + if enabled && _can_activate && _did_trigger(): + _can_activate = false + _activated = true + $AnimationPlayer.play("fire") + + +func _did_trigger()->bool: + if $TopRayCast.is_colliding(): + var collider = $TopRayCast.get_collider() + if collider.name == "SolidsTileMap": + var new_cast = $TopRayCast.cast_to + new_cast.x = to_local($TopRayCast.get_collision_point()).x - 1 + $TopRayCast.cast_to = new_cast + if collider.name == "Player": + return true + if $BottomRayCast.is_colliding(): + var collider = $BottomRayCast.get_collider() + if collider.name == "SolidsTileMap": + var new_cast = $BottomRayCast.cast_to + new_cast.x = to_local($BottomRayCast.get_collision_point()).x - 1 + $BottomRayCast.cast_to = new_cast + if $BottomRayCast.get_collider().name == "Player": + return true + return false + + + + +func _on_fire_animation_ended(): + print("Fire!") + var arrow = Arrow.instance() + arrow.position = Vector2(8,-3) + add_child(arrow) + _ammo -= 1 + if _ammo == 0: + $AnimationPlayer.play("idle") + _activated = false + $TimeoutTimer.start(timeout) + else: + $AnimationPlayer.play("fire") + + pass + +func _on_TimeoutTimer_timeout()->void: + _can_activate = true; + $AnimationPlayer.play("armed") + _ammo = ammo diff --git a/src/Hazards/MaskTrap.tscn b/src/Hazards/MaskTrap.tscn new file mode 100644 index 0000000..636d8da --- /dev/null +++ b/src/Hazards/MaskTrap.tscn @@ -0,0 +1,100 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://assets/Traps/mask_trap.png" type="Texture" id=1] +[ext_resource path="res://src/Hazards/MaskTrap.gd" type="Script" id=2] + +[sub_resource type="Animation" id=1] +resource_name = "armed" +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 1 ] +} + +[sub_resource type="Animation" id=2] +resource_name = "fire" +length = 0.3 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 1, 2, 3, 4 ] +} +tracks/1/type = "method" +tracks/1/path = NodePath(".") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0.3 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "_on_fire_animation_ended" +} ] +} + +[sub_resource type="Animation" id=3] +resource_name = "idle" +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} + +[node name="MaskTrap" type="Node2D"] +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 7, -8 ) +texture = ExtResource( 1 ) +hframes = 6 +frame = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +autoplay = "armed" +anims/armed = SubResource( 1 ) +anims/fire = SubResource( 2 ) +anims/idle = SubResource( 3 ) + +[node name="TopRayCast" type="RayCast2D" parent="."] +position = Vector2( 3, -16 ) +enabled = true +cast_to = Vector2( 150, 0 ) +collision_mask = 9 + +[node name="BottomRayCast" type="RayCast2D" parent="."] +position = Vector2( 3, 0 ) +enabled = true +cast_to = Vector2( 150, 0 ) +collision_mask = 9 + +[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."] +position = Vector2( 7, -8 ) + +[node name="TimeoutTimer" type="Timer" parent="."] +one_shot = true +[connection signal="timeout" from="TimeoutTimer" to="." method="_on_TimeoutTimer_timeout"]