diff --git a/src/DoorCommand/door_command.gd b/src/DoorCommand/door_command.gd index b05cb59..09d5b6d 100644 --- a/src/DoorCommand/door_command.gd +++ b/src/DoorCommand/door_command.gd @@ -5,7 +5,7 @@ extends Area2D func _ready(): pass -func _process(delta): +func _process(_delta): pass func _on_body_entered(body): diff --git a/src/Levels/level_0.tscn b/src/Levels/level_0.tscn index bd89627..4c76ccf 100644 --- a/src/Levels/level_0.tscn +++ b/src/Levels/level_0.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://c27s56ly83uge"] +[gd_scene load_steps=5 format=3 uid="uid://c27s56ly83uge"] [ext_resource type="PackedScene" uid="uid://ccjenj1vqgosm" path="res://Sandbox/sandbox.tscn" id="1_jvyfv"] [ext_resource type="PackedScene" uid="uid://c5f7m5oi32kr5" path="res://DoorCommand/door_command.tscn" id="2_033qt"] [ext_resource type="PackedScene" uid="uid://d30oryxv0w7pf" path="res://Door/door.tscn" id="3_sdm5y"] +[ext_resource type="PackedScene" uid="uid://dc0s54l2iwr0c" path="res://Bear/bear.tscn" id="4_aud8k"] [node name="Level0" type="Node2D"] @@ -11,12 +12,21 @@ [node name="TileMap" parent="Sandbox" index="0"] layer_0/tile_data = PackedInt32Array(589839, 0, 0, 655375, 0, 0, 720912, 0, 0, 786448, 0, 0, 786449, 0, 0, 851986, 0, 0, 851987, 0, 0, 917523, 0, 0, 917524, 0, 0, 983060, 0, 0, 983061, 0, 0, 1048598, 0, 0, 1114134, 0, 0, 1114135, 0, 0, 1114136, 0, 0, 1114137, 0, 0, 1114138, 0, 0, 524301, 0, 0, 589837, 0, 0, 655373, 0, 0, 720909, 0, 0, 786445, 0, 0, 851981, 0, 0, 917517, 0, 0, 983053, 0, 0, 1048589, 0, 0, 1114125, 0, 0, 1179661, 0, 0, 1245197, 0, 0, 524302, 0, 0, 589838, 0, 0, 655374, 0, 0, 720910, 0, 0, 786446, 0, 0, 851982, 0, 0, 917518, 0, 0, 983054, 0, 0, 1048590, 0, 0, 1114126, 0, 0, 1179662, 0, 0, 1245198, 0, 0, 524303, 0, 0, 720911, 0, 0, 786447, 0, 0, 851983, 0, 0, 917519, 0, 0, 983055, 0, 0, 1048591, 0, 0, 1114127, 0, 0, 1179663, 0, 0, 1245199, 0, 0, 524304, 0, 0, 589840, 0, 0, 655376, 0, 0, 851984, 0, 0, 917520, 0, 0, 983056, 0, 0, 1048592, 0, 0, 1114128, 0, 0, 1179664, 0, 0, 1245200, 0, 0, 524305, 0, 0, 589841, 0, 0, 655377, 0, 0, 720913, 0, 0, 851985, 0, 0, 917521, 0, 0, 983057, 0, 0, 1048593, 0, 0, 1114129, 0, 0, 1179665, 0, 0, 1245201, 0, 0, 524306, 0, 0, 589842, 0, 0, 655378, 0, 0, 720914, 0, 0, 786450, 0, 0, 917522, 0, 0, 983058, 0, 0, 1048594, 0, 0, 1114130, 0, 0, 1179666, 0, 0, 1245202, 0, 0, 524307, 0, 0, 589843, 0, 0, 655379, 0, 0, 720915, 0, 0, 786451, 0, 0, 983059, 0, 0, 1048595, 0, 0, 1114131, 0, 0, 1179667, 0, 0, 1245203, 0, 0, 524308, 0, 0, 589844, 0, 0, 655380, 0, 0, 720916, 0, 0, 786452, 0, 0, 851988, 0, 0, 1048596, 0, 0, 1114132, 0, 0, 1179668, 0, 0, 1245204, 0, 0, 524309, 0, 0, 589845, 0, 0, 655381, 0, 0, 720917, 0, 0, 786453, 0, 0, 851989, 0, 0, 917525, 0, 0, 1048597, 0, 0, 1114133, 0, 0, 1179669, 0, 0, 1245205, 0, 0, 524310, 0, 0, 589846, 0, 0, 655382, 0, 0, 720918, 0, 0, 786454, 0, 0, 851990, 0, 0, 917526, 0, 0, 983062, 0, 0, 1179670, 0, 0, 1245206, 0, 0, 524311, 0, 0, 589847, 0, 0, 655383, 0, 0, 720919, 0, 0, 786455, 0, 0, 851991, 0, 0, 917527, 0, 0, 983063, 0, 0, 1048599, 0, 0, 1179671, 0, 0, 1245207, 0, 0, 524312, 0, 0, 589848, 0, 0, 655384, 0, 0, 720920, 0, 0, 786456, 0, 0, 851992, 0, 0, 917528, 0, 0, 983064, 0, 0, 1048600, 0, 0, 1179672, 0, 0, 1245208, 0, 0, 524313, 0, 0, 589849, 0, 0, 655385, 0, 0, 720921, 0, 0, 786457, 0, 0, 851993, 0, 0, 917529, 0, 0, 983065, 0, 0, 1048601, 0, 0, 1179673, 0, 0, 1245209, 0, 0, 524314, 0, 0, 589850, 0, 0, 655386, 0, 0, 720922, 0, 0, 786458, 0, 0, 851994, 0, 0, 917530, 0, 0, 983066, 0, 0, 1048602, 0, 0, 1179674, 0, 0, 1245210, 0, 0, 524315, 0, 0, 589851, 0, 0, 655387, 0, 0, 720923, 0, 0, 786459, 0, 0, 851995, 0, 0, 917531, 0, 0, 983067, 0, 0, 1048603, 0, 0, 1114139, 0, 0, 1179675, 0, 0, 1245211, 0, 0, 524316, 0, 0, 589852, 0, 0, 655388, 0, 0, 720924, 0, 0, 786460, 0, 0, 851996, 0, 0, 917532, 0, 0, 983068, 0, 0, 1048604, 0, 0, 1114140, 0, 0, 1179676, 0, 0, 1245212, 0, 0, 1507347, 0, 0, 1572883, 0, 0, 1638419, 0, 0, 1703955, 0, 0, 1703956, 0, 0, 1638420, 0, 0, 1572884, 0, 0, 1507348, 0, 0, 1441812, 0, 0, 1376276, 0, 0, 1310740, 0, 0, 1310741, 0, 0, 1376277, 0, 0, 1441813, 0, 0, 1507349, 0, 0, 1572885, 0, 0, 1638421, 0, 0, 1703957, 0, 0, 1507350, 0, 0, 1572886, 0, 0, 1638422, 0, 0, 1703958, 0, 0, 1769491, 0, 0, 1769492, 0, 0, 1769493, 0, 0, 1769494, 0, 0, 1835030, 0, 0, 1900565, 0, 0, 1966101, 0, 0, 2031637, 0, 0, 2097173, 0, 0, 2162709, 0, 0, 2228245, 0, 0, 2293781, 0, 0, 2359317, 0, 0, 2293780, 0, 0, 2228244, 0, 0, 2162708, 0, 0, 2097172, 0, 0, 2031636, 0, 0, 1966100, 0, 0, 1900564, 0, 0, 1835028, 0, 0, 1835029, 0, 0, 2359316, 0, 0, 1835027, 0, 0, 2424852, 0, 0, 2424853, 0, 0, 2490389, 0, 0, 2555924, 0, 0, 2621460, 0, 0, 2686996, 0, 0, 2752532, 0, 0, 2752533, 0, 0, 2818069, 0, 0, 2883605, 0, 0, 2949141, 0, 0, 3014677, 65536, 0, 2818068, 0, 0, 2686997, 0, 0, 2621461, 0, 0, 2555925, 0, 0, 2490388, 0, 0, 2883604, 0, 0, 2949140, 0, 0, 3014676, 65536, 0, 1507356, 65536, 0, 1441820, 65536, 0, 1376284, 65536, 0, 1310748, 65536, 0, 1310747, 65536, 0, 1310746, 65536, 0, 1310745, 65536, 0, 1310744, 65536, 0, 1310743, 65536, 0, 1310742, 65536, 0, 1376278, 65536, 0, 1441814, 65536, 0, 1441815, 65536, 0, 1376279, 65536, 0, 1376280, 65536, 0, 1441816, 65536, 0, 1507352, 65536, 0, 1507351, 65536, 0, 1572887, 65536, 0, 1638423, 65536, 0, 1703959, 65536, 0, 1769495, 65536, 0, 1835031, 65536, 0, 1900567, 65536, 0, 1900566, 65536, 0, 1966102, 65536, 0, 2031638, 65536, 0, 2097174, 65536, 0, 2162710, 65536, 0, 2228246, 65536, 0, 2293782, 65536, 0, 2359318, 65536, 0, 2424854, 65536, 0, 2490390, 65536, 0, 2555926, 65536, 0, 2621462, 65536, 0, 2686998, 65536, 0, 2752534, 65536, 0, 2818070, 65536, 0, 2883606, 65536, 0, 2949142, 65536, 0, 3014678, 65536, 0, 3014679, 65536, 0, 2949143, 65536, 0, 2883607, 65536, 0, 2818071, 65536, 0, 2752535, 65536, 0, 2686999, 65536, 0, 2621463, 65536, 0, 2555927, 65536, 0, 2490391, 65536, 0, 2424855, 65536, 0, 2359319, 65536, 0, 2293783, 65536, 0, 2228247, 65536, 0, 2162711, 65536, 0, 2097175, 65536, 0, 2031639, 65536, 0, 1966103, 65536, 0, 1966104, 65536, 0, 1900568, 65536, 0, 1835032, 65536, 0, 1769496, 65536, 0, 1703960, 65536, 0, 1638424, 65536, 0, 1572888, 65536, 0, 1572889, 65536, 0, 1507353, 65536, 0, 1441817, 65536, 0, 1376281, 65536, 0, 1376282, 65536, 0, 1441818, 65536, 0, 1507354, 65536, 0, 1572890, 65536, 0, 1638426, 65536, 0, 1638425, 65536, 0, 1703961, 65536, 0, 1769497, 65536, 0, 1835033, 65536, 0, 1900569, 65536, 0, 1966105, 65536, 0, 2031641, 65536, 0, 2031640, 65536, 0, 2097176, 65536, 0, 2162712, 65536, 0, 2228248, 65536, 0, 2293784, 65536, 0, 2359320, 65536, 0, 2424856, 65536, 0, 2490392, 65536, 0, 2555928, 65536, 0, 2621464, 65536, 0, 2687000, 65536, 0, 2752536, 65536, 0, 2818072, 65536, 0, 2883608, 65536, 0, 2949144, 65536, 0, 3014680, 65536, 0, 3014681, 65536, 0, 2949145, 65536, 0, 2883609, 65536, 0, 2818073, 65536, 0, 2752537, 65536, 0, 2687001, 65536, 0, 2621465, 65536, 0, 2555929, 65536, 0, 2490393, 65536, 0, 2424857, 65536, 0, 2359321, 65536, 0, 2293785, 65536, 0, 2228249, 65536, 0, 2162713, 65536, 0, 2097177, 65536, 0, 2097178, 65536, 0, 2031642, 65536, 0, 1966106, 65536, 0, 1900570, 65536, 0, 1835034, 65536, 0, 1769498, 65536, 0, 1703962, 65536, 0, 1703963, 65536, 0, 1638427, 65536, 0, 1572891, 65536, 0, 1507355, 65536, 0, 1441819, 65536, 0, 1376283, 65536, 0, 1572892, 65536, 0, 1638428, 65536, 0, 1703964, 65536, 0, 1769500, 65536, 0, 1769499, 65536, 0, 1835035, 65536, 0, 1900571, 65536, 0, 1966107, 65536, 0, 2031643, 65536, 0, 2097179, 65536, 0, 2162715, 65536, 0, 2162714, 65536, 0, 2228250, 65536, 0, 2293786, 65536, 0, 2359322, 65536, 0, 2424858, 65536, 0, 2490394, 65536, 0, 2555930, 65536, 0, 2621466, 65536, 0, 2687002, 65536, 0, 2752538, 65536, 0, 2818074, 65536, 0, 2883610, 65536, 0, 2949146, 65536, 0, 3014682, 65536, 0, 3014683, 65536, 0, 2949147, 65536, 0, 2883611, 65536, 0, 2818075, 65536, 0, 2752539, 65536, 0, 2687003, 65536, 0, 2621467, 65536, 0, 2555931, 65536, 0, 2490395, 65536, 0, 2424859, 65536, 0, 2359323, 65536, 0, 2293787, 65536, 0, 2228251, 65536, 0, 2228252, 65536, 0, 2162716, 65536, 0, 2097180, 65536, 0, 2031644, 65536, 0, 1966108, 65536, 0, 1900572, 65536, 0, 1835036, 65536, 0, 2293788, 65536, 0, 2359324, 65536, 0, 2424860, 65536, 0, 2490396, 65536, 0, 2555932, 65536, 0, 2621468, 65536, 0, 2687004, 65536, 0, 2752540, 65536, 0, 2818076, 65536, 0, 2883612, 65536, 0, 2949148, 65536, 0, 3014684, 65536, 0, 1507342, 65536, 0, 1441806, 65536, 0, 1376270, 65536, 0, 1310734, 65536, 0, 1310733, 65536, 0, 1376269, 65536, 0, 1441805, 65536, 0, 1507341, 65536, 0, 1572877, 65536, 0, 1638413, 65536, 0, 1703949, 65536, 0, 1769485, 65536, 0, 1835021, 65536, 0, 1900557, 65536, 0, 1966093, 65536, 0, 2031629, 65536, 0, 2097165, 65536, 0, 2162701, 65536, 0, 2228237, 65536, 0, 2293773, 65536, 0, 2359309, 65536, 0, 2424845, 65536, 0, 2490381, 65536, 0, 2555917, 65536, 0, 2621453, 65536, 0, 2686989, 65536, 0, 2752525, 65536, 0, 2818061, 65536, 0, 2883597, 65536, 0, 2949133, 65536, 0, 3014669, 65536, 0, 3014670, 65536, 0, 2949134, 65536, 0, 2883598, 65536, 0, 2818062, 65536, 0, 2752526, 65536, 0, 2686990, 65536, 0, 2621454, 65536, 0, 2555918, 65536, 0, 2490382, 65536, 0, 2424846, 65536, 0, 2359310, 65536, 0, 2293774, 65536, 0, 2228238, 65536, 0, 2162702, 65536, 0, 2097166, 65536, 0, 2031630, 65536, 0, 1966094, 65536, 0, 1900558, 65536, 0, 1835022, 65536, 0, 1769486, 65536, 0, 1703950, 65536, 0, 1638414, 65536, 0, 1572878, 65536, 0, 1572879, 65536, 0, 1507343, 65536, 0, 1441807, 65536, 0, 1376271, 65536, 0, 1310735, 65536, 0, 1310736, 65536, 0, 1376272, 65536, 0, 1441808, 65536, 0, 1507344, 65536, 0, 1572880, 65536, 0, 1638416, 65536, 0, 1638415, 65536, 0, 1703951, 65536, 0, 1769487, 65536, 0, 1835023, 65536, 0, 1900559, 65536, 0, 1966095, 65536, 0, 2031631, 65536, 0, 2097167, 65536, 0, 2162703, 65536, 0, 2228239, 65536, 0, 2293775, 65536, 0, 2359311, 65536, 0, 2424847, 65536, 0, 2490383, 65536, 0, 2555919, 65536, 0, 2621455, 65536, 0, 2686991, 65536, 0, 2752527, 65536, 0, 2818063, 65536, 0, 2883599, 65536, 0, 2949135, 65536, 0, 3014671, 65536, 0, 3014672, 65536, 0, 2949136, 65536, 0, 2883600, 65536, 0, 2818064, 65536, 0, 2752528, 65536, 0, 2686992, 65536, 0, 2621456, 65536, 0, 2555920, 65536, 0, 2490384, 65536, 0, 2424848, 65536, 0, 2359312, 65536, 0, 2293776, 65536, 0, 2228240, 65536, 0, 2162704, 65536, 0, 2097168, 65536, 0, 2031632, 65536, 0, 1966096, 65536, 0, 1900560, 65536, 0, 1835024, 65536, 0, 1769488, 65536, 0, 1703952, 65536, 0, 1703953, 65536, 0, 1638417, 65536, 0, 1572881, 65536, 0, 1507345, 65536, 0, 1441809, 65536, 0, 1376273, 65536, 0, 1310737, 65536, 0, 1310738, 65536, 0, 1376274, 65536, 0, 1441810, 65536, 0, 1507346, 65536, 0, 1572882, 65536, 0, 1638418, 65536, 0, 1703954, 65536, 0, 1769490, 65536, 0, 1769489, 65536, 0, 1835025, 65536, 0, 1900561, 65536, 0, 1966097, 65536, 0, 2031633, 65536, 0, 2097169, 65536, 0, 2162705, 65536, 0, 2228241, 65536, 0, 2293777, 65536, 0, 2359313, 65536, 0, 2424849, 65536, 0, 2490385, 65536, 0, 2555921, 65536, 0, 2621457, 65536, 0, 2686993, 65536, 0, 2752529, 65536, 0, 2818065, 65536, 0, 2883601, 65536, 0, 2949137, 65536, 0, 3014673, 65536, 0, 3014674, 65536, 0, 2949138, 65536, 0, 2883602, 65536, 0, 2818066, 65536, 0, 2752530, 65536, 0, 2686994, 65536, 0, 2621458, 65536, 0, 2555922, 65536, 0, 2490386, 65536, 0, 2424850, 65536, 0, 2359314, 65536, 0, 2293778, 65536, 0, 2228242, 65536, 0, 2162706, 65536, 0, 2097170, 65536, 0, 2031634, 65536, 0, 1966098, 65536, 0, 1900562, 65536, 0, 1835026, 65536, 0, 1900563, 65536, 0, 1966099, 65536, 0, 2031635, 65536, 0, 2097171, 65536, 0, 2162707, 65536, 0, 2228243, 65536, 0, 2293779, 65536, 0, 2359315, 65536, 0, 2424851, 65536, 0, 2490387, 65536, 0, 2555923, 65536, 0, 2621459, 65536, 0, 2686995, 65536, 0, 2752531, 65536, 0, 2818067, 65536, 0, 2883603, 65536, 0, 2949139, 65536, 0, 3014675, 65536, 0, 1441811, 65536, 0, 1376275, 65536, 0, 1310739, 65536, 0, 262149, 65536, 0, 327685, 65536, 0, 393221, 65536, 0, 458757, 65536, 0, 524293, 65536, 0, 589829, 65536, 0, 655365, 65536, 0, 720901, 65536, 0, 786437, 65536, 0, 851973, 65536, 0, 917509, 65536, 0, 983045, 65536, 0, 1048581, 65536, 0, 1114117, 65536, 0, 1179653, 65536, 0, 1245189, 65536, 0, 1310725, 65536, 0, 1376261, 65536, 0, 1441797, 65536, 0, 1507333, 65536, 0, 1572869, 65536, 0, 1638405, 65536, 0, 1703941, 65536, 0, 1769477, 65536, 0, 1835013, 65536, 0, 262150, 65536, 0, 327686, 65536, 0, 393222, 65536, 0, 458758, 65536, 0, 524294, 65536, 0, 589830, 65536, 0, 655366, 65536, 0, 720902, 65536, 0, 786438, 65536, 0, 851974, 65536, 0, 917510, 65536, 0, 983046, 65536, 0, 1048582, 65536, 0, 1114118, 65536, 0, 1179654, 65536, 0, 1245190, 65536, 0, 1310726, 65536, 0, 1376262, 65536, 0, 1441798, 65536, 0, 1507334, 65536, 0, 1572870, 65536, 0, 1638406, 65536, 0, 1703942, 65536, 0, 1769478, 65536, 0, 1835014, 65536, 0, 262151, 65536, 0, 327687, 65536, 0, 393223, 65536, 0, 458759, 65536, 0, 524295, 65536, 0, 589831, 65536, 0, 655367, 65536, 0, 720903, 65536, 0, 786439, 65536, 0, 851975, 65536, 0, 917511, 65536, 0, 983047, 65536, 0, 1048583, 65536, 0, 1114119, 65536, 0, 1179655, 65536, 0, 1245191, 65536, 0, 1310727, 65536, 0, 1376263, 65536, 0, 1441799, 65536, 0, 1507335, 65536, 0, 1572871, 65536, 0, 1638407, 65536, 0, 1703943, 65536, 0, 1769479, 65536, 0, 1835015, 65536, 0, 262152, 65536, 0, 327688, 65536, 0, 393224, 65536, 0, 458760, 65536, 0, 524296, 65536, 0, 589832, 65536, 0, 655368, 65536, 0, 720904, 65536, 0, 786440, 65536, 0, 851976, 65536, 0, 917512, 65536, 0, 983048, 65536, 0, 1048584, 65536, 0, 1114120, 65536, 0, 1179656, 65536, 0, 1245192, 65536, 0, 1310728, 65536, 0, 1376264, 65536, 0, 1441800, 65536, 0, 1507336, 65536, 0, 1572872, 65536, 0, 1638408, 65536, 0, 1703944, 65536, 0, 1769480, 65536, 0, 1835016, 65536, 0, 262153, 65536, 0, 327689, 65536, 0, 393225, 65536, 0, 458761, 65536, 0, 524297, 65536, 0, 589833, 65536, 0, 655369, 65536, 0, 720905, 65536, 0, 786441, 65536, 0, 851977, 65536, 0, 917513, 65536, 0, 983049, 65536, 0, 1048585, 65536, 0, 1114121, 65536, 0, 1179657, 65536, 0, 1245193, 65536, 0, 1310729, 65536, 0, 1376265, 65536, 0, 1441801, 65536, 0, 1507337, 65536, 0, 1572873, 65536, 0, 1638409, 65536, 0, 1703945, 65536, 0, 1769481, 65536, 0, 1835017, 65536, 0, 262154, 65536, 0, 327690, 65536, 0, 393226, 65536, 0, 458762, 65536, 0, 524298, 65536, 0, 589834, 65536, 0, 655370, 65536, 0, 720906, 65536, 0, 786442, 65536, 0, 851978, 65536, 0, 917514, 65536, 0, 983050, 65536, 0, 1048586, 65536, 0, 1114122, 65536, 0, 1179658, 65536, 0, 1245194, 65536, 0, 1310730, 65536, 0, 1376266, 65536, 0, 1441802, 65536, 0, 1507338, 65536, 0, 1572874, 65536, 0, 1638410, 65536, 0, 1703946, 65536, 0, 1769482, 65536, 0, 1835018, 65536, 0, 262155, 65536, 0, 327691, 65536, 0, 393227, 65536, 0, 458763, 65536, 0, 524299, 65536, 0, 589835, 65536, 0, 655371, 65536, 0, 720907, 65536, 0, 786443, 65536, 0, 851979, 65536, 0, 917515, 65536, 0, 983051, 65536, 0, 1048587, 65536, 0, 1114123, 65536, 0, 1179659, 65536, 0, 1245195, 65536, 0, 1310731, 65536, 0, 1376267, 65536, 0, 1441803, 65536, 0, 1507339, 65536, 0, 1572875, 65536, 0, 1638411, 65536, 0, 1703947, 65536, 0, 1769483, 65536, 0, 1835019, 65536, 0, 262156, 65536, 0, 327692, 65536, 0, 393228, 65536, 0, 458764, 65536, 0, 524300, 65536, 0, 589836, 65536, 0, 655372, 65536, 0, 720908, 65536, 0, 786444, 65536, 0, 851980, 65536, 0, 917516, 65536, 0, 983052, 65536, 0, 1048588, 65536, 0, 1114124, 65536, 0, 1179660, 65536, 0, 1245196, 65536, 0, 1310732, 65536, 0, 1376268, 65536, 0, 1441804, 65536, 0, 1507340, 65536, 0, 1572876, 65536, 0, 1638412, 65536, 0, 1703948, 65536, 0, 1769484, 65536, 0, 1835020, 65536, 0, 196637, 65536, 0, 262173, 65536, 0, 327709, 65536, 0, 393245, 65536, 0, 458781, 65536, 0, 524317, 65536, 0, 589853, 65536, 0, 655389, 65536, 0, 720925, 65536, 0, 786461, 65536, 0, 851997, 65536, 0, 917533, 65536, 0, 983069, 65536, 0, 1048605, 65536, 0, 1114141, 65536, 0, 1179677, 65536, 0, 1245213, 65536, 0, 1310749, 65536, 0, 1376285, 65536, 0, 1441821, 65536, 0, 1507357, 65536, 0, 1572893, 65536, 0, 1638429, 65536, 0, 1703965, 65536, 0, 1769501, 65536, 0, 196638, 65536, 0, 262174, 65536, 0, 327710, 65536, 0, 393246, 65536, 0, 458782, 65536, 0, 524318, 65536, 0, 589854, 65536, 0, 655390, 65536, 0, 720926, 65536, 0, 786462, 65536, 0, 851998, 65536, 0, 917534, 65536, 0, 983070, 65536, 0, 1048606, 65536, 0, 1114142, 65536, 0, 1179678, 65536, 0, 1245214, 65536, 0, 1310750, 65536, 0, 1376286, 65536, 0, 1441822, 65536, 0, 1507358, 65536, 0, 1572894, 65536, 0, 1638430, 65536, 0, 1703966, 65536, 0, 1769502, 65536, 0, 196639, 65536, 0, 262175, 65536, 0, 327711, 65536, 0, 393247, 65536, 0, 458783, 65536, 0, 524319, 65536, 0, 589855, 65536, 0, 655391, 65536, 0, 720927, 65536, 0, 786463, 65536, 0, 851999, 65536, 0, 917535, 65536, 0, 983071, 65536, 0, 1048607, 65536, 0, 1114143, 65536, 0, 1179679, 65536, 0, 1245215, 65536, 0, 1310751, 65536, 0, 1376287, 65536, 0, 1441823, 65536, 0, 1507359, 65536, 0, 1572895, 65536, 0, 1638431, 65536, 0, 1703967, 65536, 0, 1769503, 65536, 0, 196640, 65536, 0, 262176, 65536, 0, 327712, 65536, 0, 393248, 65536, 0, 458784, 65536, 0, 524320, 65536, 0, 589856, 65536, 0, 655392, 65536, 0, 720928, 65536, 0, 786464, 65536, 0, 852000, 65536, 0, 917536, 65536, 0, 983072, 65536, 0, 1048608, 65536, 0, 1114144, 65536, 0, 1179680, 65536, 0, 1245216, 65536, 0, 1310752, 65536, 0, 1376288, 65536, 0, 1441824, 65536, 0, 1507360, 65536, 0, 1572896, 65536, 0, 1638432, 65536, 0, 1703968, 65536, 0, 1769504, 65536, 0, 196641, 65536, 0, 262177, 65536, 0, 327713, 65536, 0, 393249, 65536, 0, 458785, 65536, 0, 524321, 65536, 0, 589857, 65536, 0, 655393, 65536, 0, 720929, 65536, 0, 786465, 65536, 0, 852001, 65536, 0, 917537, 65536, 0, 983073, 65536, 0, 1048609, 65536, 0, 1114145, 65536, 0, 1179681, 65536, 0, 1245217, 65536, 0, 1310753, 65536, 0, 1376289, 65536, 0, 1441825, 65536, 0, 1507361, 65536, 0, 1572897, 65536, 0, 1638433, 65536, 0, 1703969, 65536, 0, 1769505, 65536, 0, 196642, 65536, 0, 262178, 65536, 0, 327714, 65536, 0, 393250, 65536, 0, 458786, 65536, 0, 524322, 65536, 0, 589858, 65536, 0, 655394, 65536, 0, 720930, 65536, 0, 786466, 65536, 0, 852002, 65536, 0, 917538, 65536, 0, 983074, 65536, 0, 1048610, 65536, 0, 1114146, 65536, 0, 1179682, 65536, 0, 1245218, 65536, 0, 1310754, 65536, 0, 1376290, 65536, 0, 1441826, 65536, 0, 1507362, 65536, 0, 1572898, 65536, 0, 1638434, 65536, 0, 1703970, 65536, 0, 1769506, 65536, 0, 196643, 65536, 0, 262179, 65536, 0, 327715, 65536, 0, 393251, 65536, 0, 458787, 65536, 0, 524323, 65536, 0, 589859, 65536, 0, 655395, 65536, 0, 720931, 65536, 0, 786467, 65536, 0, 852003, 65536, 0, 917539, 65536, 0, 983075, 65536, 0, 1048611, 65536, 0, 1114147, 65536, 0, 1179683, 65536, 0, 1245219, 65536, 0, 1310755, 65536, 0, 1376291, 65536, 0, 1441827, 65536, 0, 1507363, 65536, 0, 1572899, 65536, 0, 1638435, 65536, 0, 1703971, 65536, 0, 1769507, 65536, 0, 196644, 65536, 0, 262180, 65536, 0, 327716, 65536, 0, 393252, 65536, 0, 458788, 65536, 0, 524324, 65536, 0, 589860, 65536, 0, 655396, 65536, 0, 720932, 65536, 0, 786468, 65536, 0, 852004, 65536, 0, 917540, 65536, 0, 983076, 65536, 0, 1048612, 65536, 0, 1114148, 65536, 0, 1179684, 65536, 0, 1245220, 65536, 0, 1310756, 65536, 0, 1376292, 65536, 0, 1441828, 65536, 0, 1507364, 65536, 0, 1572900, 65536, 0, 1638436, 65536, 0, 1703972, 65536, 0, 1769508, 65536, 0, 196645, 65536, 0, 262181, 65536, 0, 327717, 65536, 0, 393253, 65536, 0, 458789, 65536, 0, 524325, 65536, 0, 589861, 65536, 0, 655397, 65536, 0, 720933, 65536, 0, 786469, 65536, 0, 852005, 65536, 0, 917541, 65536, 0, 983077, 65536, 0, 1048613, 65536, 0, 1114149, 65536, 0, 1179685, 65536, 0, 1245221, 65536, 0, 1310757, 65536, 0, 1376293, 65536, 0, 1441829, 65536, 0, 1507365, 65536, 0, 1572901, 65536, 0, 1638437, 65536, 0, 1703973, 65536, 0, 1769509, 65536, 0, 196617, 65536, 0, 196618, 65536, 0, 196619, 65536, 0, 196620, 65536, 0, 196621, 65536, 0, 262157, 65536, 0, 327693, 65536, 0, 393229, 65536, 0, 458765, 65536, 0, 196622, 65536, 0, 262158, 65536, 0, 327694, 65536, 0, 393230, 65536, 0, 458766, 65536, 0, 196623, 65536, 0, 262159, 65536, 0, 327695, 65536, 0, 393231, 65536, 0, 458767, 65536, 0, 196624, 65536, 0, 262160, 65536, 0, 327696, 65536, 0, 393232, 65536, 0, 458768, 65536, 0, 196625, 65536, 0, 262161, 65536, 0, 327697, 65536, 0, 393233, 65536, 0, 458769, 65536, 0, 196626, 65536, 0, 262162, 65536, 0, 327698, 65536, 0, 393234, 65536, 0, 458770, 65536, 0, 196627, 65536, 0, 262163, 65536, 0, 327699, 65536, 0, 393235, 65536, 0, 458771, 65536, 0, 196628, 65536, 0, 262164, 65536, 0, 327700, 65536, 0, 393236, 65536, 0, 458772, 65536, 0, 196629, 65536, 0, 262165, 65536, 0, 327701, 65536, 0, 393237, 65536, 0, 458773, 65536, 0, 196630, 65536, 0, 262166, 65536, 0, 327702, 65536, 0, 393238, 65536, 0, 458774, 65536, 0, 196631, 65536, 0, 262167, 65536, 0, 327703, 65536, 0, 393239, 65536, 0, 458775, 65536, 0, 196632, 65536, 0, 262168, 65536, 0, 327704, 65536, 0, 393240, 65536, 0, 458776, 65536, 0, 196633, 65536, 0, 262169, 65536, 0, 327705, 65536, 0, 393241, 65536, 0, 458777, 65536, 0, 196634, 65536, 0, 262170, 65536, 0, 327706, 65536, 0, 393242, 65536, 0, 458778, 65536, 0, 196635, 65536, 0, 262171, 65536, 0, 327707, 65536, 0, 393243, 65536, 0, 458779, 65536, 0, 196636, 65536, 0, 262172, 65536, 0, 327708, 65536, 0, 393244, 65536, 0, 458780, 65536, 0, 3014667, 65536, 0, 3080203, 65536, 0, 3145739, 65536, 0, 3211275, 65536, 0, 3276811, 65536, 0, 3342347, 65536, 0, 3407883, 65536, 0, 3473419, 65536, 0, 3538955, 65536, 0, 3604491, 65536, 0, 3670027, 65536, 0, 3014668, 65536, 0, 3080204, 65536, 0, 3145740, 65536, 0, 3211276, 65536, 0, 3276812, 65536, 0, 3342348, 65536, 0, 3407884, 65536, 0, 3473420, 65536, 0, 3538956, 65536, 0, 3604492, 65536, 0, 3670028, 65536, 0, 3080205, 65536, 0, 3145741, 65536, 0, 3211277, 65536, 0, 3276813, 65536, 0, 3342349, 65536, 0, 3407885, 65536, 0, 3473421, 65536, 0, 3538957, 65536, 0, 3604493, 65536, 0, 3670029, 65536, 0, 3080206, 65536, 0, 3145742, 65536, 0, 3211278, 65536, 0, 3276814, 65536, 0, 3342350, 65536, 0, 3407886, 65536, 0, 3473422, 65536, 0, 3538958, 65536, 0, 3604494, 65536, 0, 3670030, 65536, 0, 3080207, 65536, 0, 3145743, 65536, 0, 3211279, 65536, 0, 3276815, 65536, 0, 3342351, 65536, 0, 3407887, 65536, 0, 3473423, 65536, 0, 3538959, 65536, 0, 3604495, 65536, 0, 3670031, 65536, 0, 3080208, 65536, 0, 3145744, 65536, 0, 3211280, 65536, 0, 3276816, 65536, 0, 3342352, 65536, 0, 3407888, 65536, 0, 3473424, 65536, 0, 3538960, 65536, 0, 3604496, 65536, 0, 3670032, 65536, 0, 3080209, 65536, 0, 3145745, 65536, 0, 3211281, 65536, 0, 3276817, 65536, 0, 3342353, 65536, 0, 3407889, 65536, 0, 3473425, 65536, 0, 3538961, 65536, 0, 3604497, 65536, 0, 3670033, 65536, 0, 3080210, 65536, 0, 3145746, 65536, 0, 3211282, 65536, 0, 3276818, 65536, 0, 3342354, 65536, 0, 3407890, 65536, 0, 3473426, 65536, 0, 3538962, 65536, 0, 3604498, 65536, 0, 3670034, 65536, 0, 3080211, 65536, 0, 3145747, 65536, 0, 3211283, 65536, 0, 3276819, 65536, 0, 3342355, 65536, 0, 3407891, 65536, 0, 3473427, 65536, 0, 3538963, 65536, 0, 3604499, 65536, 0, 3670035, 65536, 0, 3080212, 65536, 0, 3145748, 65536, 0, 3211284, 65536, 0, 3276820, 65536, 0, 3342356, 65536, 0, 3407892, 65536, 0, 3473428, 65536, 0, 3538964, 65536, 0, 3604500, 65536, 0, 3670036, 65536, 0, 3080213, 65536, 0, 3145749, 65536, 0, 3211285, 65536, 0, 3276821, 65536, 0, 3342357, 65536, 0, 3407893, 65536, 0, 3473429, 65536, 0, 3538965, 65536, 0, 3604501, 65536, 0, 3670037, 65536, 0, 3080214, 65536, 0, 3145750, 65536, 0, 3211286, 65536, 0, 3276822, 65536, 0, 3342358, 65536, 0, 3407894, 65536, 0, 3473430, 65536, 0, 3538966, 65536, 0, 3604502, 65536, 0, 3670038, 65536, 0, 3080215, 65536, 0, 3145751, 65536, 0, 3211287, 65536, 0, 3276823, 65536, 0, 3342359, 65536, 0, 3407895, 65536, 0, 3473431, 65536, 0, 3538967, 65536, 0, 3604503, 65536, 0, 3670039, 65536, 0, 3080216, 65536, 0, 3145752, 65536, 0, 3211288, 65536, 0, 3276824, 65536, 0, 3342360, 65536, 0, 3407896, 65536, 0, 3473432, 65536, 0, 3538968, 65536, 0, 3604504, 65536, 0, 3670040, 65536, 0, 3080217, 65536, 0, 3145753, 65536, 0, 3211289, 65536, 0, 3276825, 65536, 0, 3342361, 65536, 0, 3407897, 65536, 0, 3473433, 65536, 0, 3538969, 65536, 0, 3604505, 65536, 0, 3670041, 65536, 0, 3080218, 65536, 0, 3145754, 65536, 0, 3211290, 65536, 0, 3276826, 65536, 0, 3342362, 65536, 0, 3407898, 65536, 0, 3473434, 65536, 0, 3538970, 65536, 0, 3604506, 65536, 0, 3670042, 65536, 0, 3080219, 65536, 0, 3145755, 65536, 0, 3211291, 65536, 0, 3276827, 65536, 0, 3342363, 65536, 0, 3407899, 65536, 0, 3473435, 65536, 0, 3538971, 65536, 0, 3604507, 65536, 0, 3670043, 65536, 0, 3080220, 65536, 0, 3145756, 65536, 0, 3211292, 65536, 0, 3276828, 65536, 0, 3342364, 65536, 0, 3407900, 65536, 0, 3473436, 65536, 0, 3538972, 65536, 0, 3604508, 65536, 0, 3670044, 65536, 0, 3014685, 65536, 0, 3080221, 65536, 0, 3145757, 65536, 0, 3211293, 65536, 0, 3276829, 65536, 0, 3342365, 65536, 0, 3407901, 65536, 0, 3473437, 65536, 0, 3538973, 65536, 0, 3604509, 65536, 0, 3670045, 65536, 0, 3014686, 65536, 0, 3080222, 65536, 0, 3145758, 65536, 0, 3211294, 65536, 0, 3276830, 65536, 0, 3342366, 65536, 0, 3407902, 65536, 0, 3473438, 65536, 0, 3538974, 65536, 0, 3604510, 65536, 0, 3670046, 65536, 0, 3014687, 65536, 0, 3080223, 65536, 0, 3145759, 65536, 0, 3211295, 65536, 0, 3276831, 65536, 0, 3342367, 65536, 0, 3407903, 65536, 0, 3473439, 65536, 0, 3538975, 65536, 0, 3604511, 65536, 0, 3670047, 65536, 0, 3014688, 65536, 0, 3080224, 65536, 0, 3145760, 65536, 0, 3211296, 65536, 0, 3276832, 65536, 0, 3342368, 65536, 0, 3407904, 65536, 0, 3473440, 65536, 0, 3538976, 65536, 0, 3604512, 65536, 0, 3670048, 65536, 0, 3014689, 65536, 0, 3080225, 65536, 0, 3145761, 65536, 0, 3211297, 65536, 0, 3276833, 65536, 0, 3342369, 65536, 0, 3407905, 65536, 0, 3473441, 65536, 0, 3538977, 65536, 0, 3604513, 65536, 0, 3670049, 65536, 0, 3014690, 65536, 0, 3080226, 65536, 0, 3145762, 65536, 0, 3211298, 65536, 0, 3276834, 65536, 0, 3342370, 65536, 0, 3407906, 65536, 0, 3473442, 65536, 0, 3538978, 65536, 0, 3604514, 65536, 0, 3670050, 65536, 0) +[node name="Bear" parent="Sandbox/Bears" index="0" instance=ExtResource("4_aud8k")] +position = Vector2(872, 493) + +[node name="Strikes" parent="Sandbox" index="3"] +metadata/_edit_lock_ = true + +[node name="ColorRect" parent="Sandbox/CanvasLayer" index="0"] +metadata/_edit_lock_ = true + [node name="DoorCommand" parent="Sandbox" instance=ExtResource("2_033qt")] position = Vector2(438, 621) ID = 1 [node name="Door" parent="." instance=ExtResource("3_sdm5y")] -position = Vector2(671, 658) +position = Vector2(674, 654) ID = 1 [editable path="Sandbox"] diff --git a/src/MainMenu/main_menu.gd b/src/MainMenu/main_menu.gd index 5fb4c37..8e5efda 100644 --- a/src/MainMenu/main_menu.gd +++ b/src/MainMenu/main_menu.gd @@ -7,7 +7,7 @@ func _ready(): # Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): +func _process(_delta): pass diff --git a/src/Molotov/molotov.tscn b/src/Molotov/molotov.tscn index d8abc28..de47fba 100644 --- a/src/Molotov/molotov.tscn +++ b/src/Molotov/molotov.tscn @@ -11,7 +11,7 @@ radius = 34.0147 [node name="Molotov" type="CharacterBody2D" groups=["bombs"]] collision_layer = 2 -collision_mask = 2 +collision_mask = 0 script = ExtResource("1_uepii") [node name="Sprite2D" type="Sprite2D" parent="."] diff --git a/src/Sandbox/Strikes.gd b/src/Sandbox/Strikes.gd new file mode 100644 index 0000000..0b76716 --- /dev/null +++ b/src/Sandbox/Strikes.gd @@ -0,0 +1,41 @@ +extends Node2D + + +class Line: + var m_time: float = 0.0 + var m_source: Vector2 = Vector2(0.0, 0.0) + var m_position: Vector2 = Vector2(0.0, 0.0) + var m_color : Color = Color.RED + var m_timer : float = 0.0 + + func _init(t, src, pos, col): + m_time = t + m_source = src + m_position = pos + m_color = col + +var m_lines = [] + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + for line in m_lines: + line.m_timer += delta + var t = min(1.0, line.m_timer / line.m_time) + line.m_color = Color(1, 0, 0, 1.0 - t) + + m_lines = m_lines.filter(func (x): return x.m_timer < x.m_time) + queue_redraw() + +func add_line(pos: Vector2, duration: float): + var src = Vector2(randf_range(0, 800), 0) + m_lines.push_back(Line.new(duration, src, pos, Color.RED)) + +func _draw(): + for line in m_lines: + draw_line(line.m_source, line.m_position, line.m_color, 3) + + + diff --git a/src/Sandbox/sandbox.gd b/src/Sandbox/sandbox.gd index a2822fd..dc8d7e6 100644 --- a/src/Sandbox/sandbox.gd +++ b/src/Sandbox/sandbox.gd @@ -6,6 +6,10 @@ var process_state = null var m_death_timer = 0.0 var m_death_time = 2.0 +var m_strike_time = 1.0 +var m_strike_timer = 0.0 +var m_strikes = [] + func _ready(): for bear in get_tree().get_nodes_in_group('bears'): bear.m_target = $Player @@ -16,12 +20,27 @@ func _ready(): func _process(delta): if self.process_state: self.process_state.call(delta) - + func process(delta): for actor in get_tree().get_nodes_in_group('actors'): if is_outside(actor) and actor.is_normal(): actor.to_falling() - + + if m_strike_timer >= m_strike_time: + var all = $TileMap.get_used_cells(0) + all.shuffle() + var ground = null + for t in all: + var data = $TileMap.get_cell_tile_data(0, t) + if data.get_custom_data('type') == 'ground': + ground = t + break + self.add_broken_ground(ground, 1, 0.8) + $Strikes.add_line(to_global($TileMap.map_to_local(ground)), 0.15) + m_strike_timer = 0.0 + m_strike_time = randf() * 5.0 + + m_strike_timer += delta if m_broken_timer >= m_broken_time: var k = 0 var N = 2 diff --git a/src/Sandbox/sandbox.tscn b/src/Sandbox/sandbox.tscn index 57bb0c8..a8a3721 100644 --- a/src/Sandbox/sandbox.tscn +++ b/src/Sandbox/sandbox.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://ccjenj1vqgosm"] +[gd_scene load_steps=5 format=3 uid="uid://ccjenj1vqgosm"] [ext_resource type="Script" path="res://Sandbox/sandbox.gd" id="1_e3dom"] [ext_resource type="TileSet" uid="uid://c7xunhoxuo3ha" path="res://Sandbox/tile_set.tres" id="1_veo4i"] [ext_resource type="PackedScene" uid="uid://dhjnilcj5mvou" path="res://Player/player.tscn" id="2_yd1wa"] +[ext_resource type="Script" path="res://Sandbox/Strikes.gd" id="4_fpagp"] [node name="Sandbox" type="Node2D"] script = ExtResource("1_e3dom") @@ -17,6 +18,9 @@ position = Vector2(654, 409) [node name="Bears" type="Node" parent="."] +[node name="Strikes" type="Node2D" parent="."] +script = ExtResource("4_fpagp") + [node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="ColorRect" type="ColorRect" parent="CanvasLayer"]