diff --git a/DungeonShooting_Godot/resource/tileSet/map2/TileSet2.tres b/DungeonShooting_Godot/resource/tileSet/map2/TileSet2.tres index fc1996b..b9ea035 100644 --- a/DungeonShooting_Godot/resource/tileSet/map2/TileSet2.tres +++ b/DungeonShooting_Godot/resource/tileSet/map2/TileSet2.tres @@ -434,6 +434,7 @@ 7:3/0/terrains_peering_bit/left_side = 0 7:3/0/terrains_peering_bit/top_side = 0 8:3/0 = 0 +8:3/0/y_sort_origin = 23 8:3/0/terrain_set = 0 8:3/0/terrain = 0 8:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) @@ -443,6 +444,7 @@ 8:3/0/terrains_peering_bit/top_side = 0 8:3/0/terrains_peering_bit/top_right_corner = 0 9:3/0 = 0 +9:3/0/y_sort_origin = 23 9:3/0/terrain_set = 0 9:3/0/terrain = 0 9:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) @@ -466,6 +468,7 @@ 10:3/0/terrains_peering_bit/top_side = 0 10:3/0/terrains_peering_bit/top_right_corner = 0 11:3/0 = 0 +11:3/0/y_sort_origin = 23 11:3/0/terrain_set = 0 11:3/0/terrain = 0 11:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) @@ -479,19 +482,23 @@ 0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:4/0/physics_layer_0/angular_velocity = 0.0 1:4/0 = 0 +1:4/0/y_sort_origin = 7 1:4/0/terrain_set = 0 1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) 1:4/0/physics_layer_0/angular_velocity = 0.0 1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 2:4/0 = 0 +2:4/0/y_sort_origin = 7 2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) 2:4/0/physics_layer_0/angular_velocity = 0.0 2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 3:4/0 = 0 +3:4/0/y_sort_origin = 7 3:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) 3:4/0/physics_layer_0/angular_velocity = 0.0 3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) 4:4/0 = 0 +4:4/0/y_sort_origin = 7 4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) 4:4/0/physics_layer_0/angular_velocity = 0.0 4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) diff --git a/DungeonShooting_Godot/scene/World.tscn b/DungeonShooting_Godot/scene/World.tscn index 6b6ae51..deda1b8 100644 --- a/DungeonShooting_Godot/scene/World.tscn +++ b/DungeonShooting_Godot/scene/World.tscn @@ -23,10 +23,13 @@ environment = SubResource("Environment_g06jj") [node name="TileRoot" type="TileMap" parent="." groups=["navigation"]] +y_sort_enabled = true format = 2 layer_0/name = "Floor" layer_0/z_index = -10 layer_1/name = "Middle" +layer_1/y_sort_enabled = true +layer_1/y_sort_origin = 7 layer_1/tile_data = PackedInt32Array() layer_2/name = "Top" layer_2/modulate = Color(1, 1, 1, 0.784314) diff --git a/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn b/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn index 4439dfb..7e3129a 100644 --- a/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn +++ b/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn @@ -1,7 +1,21 @@ -[gd_scene load_steps=3 format=3 uid="uid://iwm27vpirfef"] +[gd_scene load_steps=6 format=3 uid="uid://iwm27vpirfef"] [ext_resource type="Script" path="res://src/test/TestNewTerrain.cs" id="1_68mbo"] [ext_resource type="TileSet" uid="uid://cu80e6kxc3c3x" path="res://resource/tileSet/map2/TileSet2.tres" id="1_ig8lo"] +[ext_resource type="PackedScene" uid="uid://cxhrcytrx0kcf" path="res://prefab/role/Role0001.tscn" id="3_bo13a"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="4_iy0ux"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7va3f"] +resource_local_to_scene = true +shader = ExtResource("4_iy0ux") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true +shader_parameter/grey = 0.0 [node name="TestNewTerrain" type="Node2D"] scale = Vector2(2, 2) @@ -9,8 +23,77 @@ [node name="TileMap2" type="TileMap" parent="." groups=["navigation"]] z_index = -1 +y_sort_enabled = true tile_set = ExtResource("1_ig8lo") format = 2 layer_0/tile_data = PackedInt32Array(1769510, 720896, 3, 1703974, 720896, 2, 1638438, 720896, 2, 1572902, 720896, 2, 1507366, 720896, 2, 1441830, 720896, 2, 1376294, 720896, 2, 1310758, 720896, 2, 1245222, 720896, 2, 1179686, 720896, 2, 1114150, 720896, 2, 1048614, 720896, 2, 983078, 720896, 2, 917542, 720896, 2, 852006, 720896, 2, 786470, 720896, 2, 1769509, 589824, 3, 1703973, 589824, 2, 1638437, 589824, 2, 1572901, 589824, 2, 1507365, 589824, 2, 1441829, 589824, 2, 1376293, 589824, 2, 1310757, 589824, 2, 1245221, 589824, 2, 1179685, 589824, 2, 1114149, 589824, 2, 1048613, 589824, 2, 983077, 589824, 2, 917541, 589824, 2, 852005, 589824, 2, 786469, 589824, 2, 1769508, 589824, 3, 1703972, 589824, 2, 1638436, 589824, 2, 1572900, 589824, 2, 1507364, 589824, 2, 1441828, 589824, 2, 1376292, 589824, 2, 1310756, 589824, 2, 1245220, 589824, 2, 1179684, 589824, 2, 1114148, 589824, 2, 1048612, 589824, 2, 983076, 589824, 2, 917540, 589824, 2, 852004, 589824, 2, 786468, 589824, 2, 1769507, 589824, 3, 1703971, 589824, 2, 1638435, 589824, 2, 1572899, 589824, 2, 1507363, 589824, 2, 1441827, 589824, 2, 1376291, 589824, 2, 1310755, 589824, 2, 1245219, 589824, 2, 1179683, 589824, 2, 1114147, 589824, 2, 1048611, 589824, 2, 983075, 589824, 2, 917539, 589824, 2, 852003, 589824, 2, 786467, 589824, 2, 1769506, 589824, 3, 1703970, 589824, 2, 1638434, 589824, 2, 1572898, 589824, 2, 1507362, 589824, 2, 1441826, 589824, 2, 1376290, 589824, 2, 1310754, 589824, 2, 1245218, 327680, 1, 1179682, 524288, 1, 1114146, 524288, 1, 1048610, 524288, 1, 983074, 327680, 2, 917538, 589824, 2, 852002, 589824, 2, 786466, 589824, 2, 1769505, 589824, 3, 1703969, 589824, 2, 1638433, 589824, 2, 1572897, 589824, 2, 1507361, 589824, 2, 1441825, 589824, 2, 1376289, 589824, 2, 1310753, 589824, 2, 1245217, 655360, 0, 983073, 589824, 3, 917537, 589824, 2, 852001, 589824, 2, 786465, 589824, 2, 1769504, 589824, 3, 1703968, 589824, 2, 1638432, 589824, 2, 1572896, 589824, 2, 1507360, 589824, 2, 1441824, 589824, 2, 1376288, 589824, 2, 1310752, 589824, 2, 1245216, 655360, 0, 983072, 589824, 3, 917536, 589824, 2, 852000, 589824, 2, 786464, 589824, 2, 1769503, 589824, 3, 1703967, 589824, 2, 1638431, 589824, 2, 1572895, 589824, 2, 1507359, 327680, 1, 1441823, 524288, 1, 1376287, 524288, 1, 1310751, 524288, 1, 1245215, 524288, 0, 983071, 589824, 3, 917535, 589824, 2, 851999, 589824, 2, 786463, 589824, 2, 1769502, 589824, 3, 1703966, 589824, 2, 1638430, 589824, 2, 1572894, 589824, 2, 1507358, 655360, 0, 983070, 327680, 3, 851998, 524288, 1, 786462, 327680, 2, 1769501, 589824, 3, 1703965, 589824, 2, 1638429, 589824, 2, 1572893, 327680, 1, 1507357, 524288, 0, 983069, 131072, 3, 786461, 589824, 3, 1769500, 589824, 3, 1703964, 589824, 2, 1638428, 327680, 1, 1572892, 524288, 0, 983068, 131072, 3, 786460, 589824, 3, 1769499, 589824, 3, 1703963, 589824, 2, 1638427, 655360, 0, 1376283, 196608, 3, 983067, 131072, 3, 786459, 589824, 3, 1769498, 589824, 3, 1703962, 589824, 2, 1638426, 655360, 0, 1376282, 131072, 2, 983066, 131072, 3, 786458, 589824, 3, 1769497, 589824, 3, 1703961, 589824, 2, 1638425, 393216, 1, 1572889, 720896, 0, 1376281, 65536, 3, 983065, 65536, 3, 786457, 589824, 3, 1769496, 589824, 3, 1703960, 589824, 2, 1638424, 589824, 2, 1572888, 655360, 0, 786456, 589824, 3, 1769495, 589824, 3, 1703959, 589824, 2, 1638423, 589824, 2, 1572887, 393216, 1, 1507351, 720896, 0, 983063, 720896, 3, 917527, 720896, 2, 851991, 720896, 2, 786455, 393216, 2, 1769494, 589824, 3, 1703958, 589824, 2, 1638422, 589824, 2, 1572886, 589824, 2, 1507350, 655360, 0, 983062, 589824, 3, 917526, 589824, 2, 851990, 589824, 2, 786454, 589824, 2, 1769493, 589824, 3, 1703957, 589824, 2, 1638421, 589824, 2, 1572885, 589824, 2, 1507349, 655360, 0, 983061, 589824, 3, 917525, 589824, 2, 851989, 589824, 2, 786453, 589824, 2, 1769492, 589824, 3, 1703956, 589824, 2, 1638420, 589824, 2, 1572884, 589824, 2, 1507348, 393216, 1, 1441812, 720896, 2, 1376276, 720896, 2, 1310740, 720896, 0, 983060, 589824, 3, 917524, 589824, 2, 851988, 589824, 2, 786452, 589824, 2, 1769491, 589824, 3, 1703955, 589824, 2, 1638419, 589824, 2, 1572883, 589824, 2, 1507347, 589824, 2, 1441811, 589824, 2, 1376275, 589824, 2, 1310739, 393216, 1, 1245203, 720896, 0, 1048595, 720896, 3, 983059, 393216, 2, 917523, 589824, 2, 851987, 589824, 2, 786451, 589824, 2, 1769490, 589824, 3, 1703954, 589824, 2, 1638418, 589824, 2, 1572882, 589824, 2, 1507346, 589824, 2, 1441810, 589824, 2, 1376274, 589824, 2, 1310738, 589824, 2, 1245202, 655360, 0, 1048594, 589824, 3, 983058, 589824, 2, 917522, 589824, 2, 851986, 589824, 2, 786450, 589824, 2, 1769489, 589824, 3, 1703953, 589824, 2, 1638417, 589824, 2, 1572881, 589824, 2, 1507345, 589824, 2, 1441809, 589824, 2, 1376273, 589824, 2, 1310737, 589824, 2, 1245201, 655360, 0, 1048593, 589824, 3, 983057, 589824, 2, 917521, 589824, 2, 851985, 589824, 2, 786449, 589824, 2, 1769488, 589824, 3, 1703952, 589824, 2, 1638416, 589824, 2, 1572880, 589824, 2, 1507344, 589824, 2, 1441808, 589824, 2, 1376272, 589824, 2, 1310736, 589824, 2, 1245200, 655360, 0, 1048592, 589824, 3, 983056, 589824, 2, 917520, 589824, 2, 851984, 589824, 2, 786448, 589824, 2, 1769487, 589824, 3, 1703951, 589824, 2, 1638415, 589824, 2, 1572879, 589824, 2, 1507343, 589824, 2, 1441807, 589824, 2, 1376271, 589824, 2, 1310735, 589824, 2, 1245199, 393216, 1, 1179663, 720896, 2, 1114127, 720896, 2, 1048591, 393216, 2, 983055, 589824, 2, 917519, 589824, 2, 851983, 589824, 2, 786447, 589824, 2, 1769486, 589824, 3, 1703950, 589824, 2, 1638414, 589824, 2, 1572878, 589824, 2, 1507342, 589824, 2, 1441806, 589824, 2, 1376270, 589824, 2, 1310734, 589824, 2, 1245198, 589824, 2, 1179662, 589824, 2, 1114126, 589824, 2, 1048590, 589824, 2, 983054, 589824, 2, 917518, 589824, 2, 851982, 589824, 2, 786446, 589824, 2, 1769485, 589824, 3, 1703949, 589824, 2, 1638413, 589824, 2, 1572877, 589824, 2, 1507341, 589824, 2, 1441805, 589824, 2, 1376269, 589824, 2, 1310733, 589824, 2, 1245197, 589824, 2, 1179661, 589824, 2, 1114125, 589824, 2, 1048589, 589824, 2, 983053, 589824, 2, 917517, 589824, 2, 851981, 589824, 2, 786445, 589824, 2, 1769484, 524288, 3, 1703948, 524288, 1, 1638412, 524288, 1, 1572876, 524288, 1, 1507340, 524288, 1, 1441804, 524288, 1, 1376268, 524288, 1, 1310732, 524288, 1, 1245196, 524288, 1, 1179660, 524288, 1, 1114124, 524288, 1, 1048588, 524288, 1, 983052, 524288, 1, 917516, 524288, 1, 851980, 524288, 1, 786444, 524288, 1, 720934, 720896, 2, 655398, 720896, 2, 589862, 720896, 0, 720933, 589824, 2, 655397, 589824, 2, 589861, 655360, 0, 720932, 589824, 2, 655396, 589824, 2, 589860, 655360, 0, 720931, 589824, 2, 655395, 589824, 2, 589859, 655360, 0, 720930, 589824, 2, 655394, 589824, 2, 589858, 655360, 0, 720929, 589824, 2, 655393, 589824, 2, 589857, 655360, 0, 720928, 589824, 2, 655392, 589824, 2, 589856, 655360, 0, 720927, 589824, 2, 655391, 589824, 2, 589855, 655360, 0, 720926, 589824, 2, 655390, 589824, 2, 589854, 655360, 0, 720925, 589824, 2, 655389, 589824, 2, 589853, 655360, 0, 720924, 589824, 2, 655388, 589824, 2, 589852, 655360, 0, 720923, 589824, 2, 655387, 589824, 2, 589851, 655360, 0, 720922, 589824, 2, 655386, 589824, 2, 589850, 655360, 0, 720921, 589824, 2, 655385, 589824, 2, 589849, 655360, 0, 720920, 589824, 2, 655384, 589824, 2, 589848, 655360, 0, 720919, 589824, 2, 655383, 589824, 2, 589847, 655360, 0, 720918, 589824, 2, 655382, 589824, 2, 589846, 655360, 0, 720917, 589824, 2, 655381, 589824, 2, 589845, 655360, 0, 720916, 589824, 2, 655380, 589824, 2, 589844, 655360, 0, 720915, 589824, 2, 655379, 589824, 2, 589843, 655360, 0, 720914, 589824, 2, 655378, 589824, 2, 589842, 655360, 0, 720913, 589824, 2, 655377, 589824, 2, 589841, 655360, 0, 720912, 589824, 2, 655376, 589824, 2, 589840, 655360, 0, 720911, 589824, 2, 655375, 589824, 2, 589839, 655360, 0, 720910, 589824, 2, 655374, 589824, 2, 589838, 655360, 0, 720909, 589824, 2, 655373, 589824, 2, 589837, 655360, 0, 720908, 524288, 1, 655372, 524288, 1, 589836, 524288, 0, 1114128, 131072, 4, 1114129, 131072, 4, 1114130, 131072, 4, 1114131, 196608, 4, 1048609, 131072, 4, 1048608, 131072, 4, 1048607, 131072, 4, 1048606, 131072, 4, 1048605, 131072, 4, 1048604, 131072, 4, 1048603, 131072, 4, 1048602, 131072, 4, 1048601, 65536, 4, 851993, 131072, 4, 851994, 131072, 4, 851995, 131072, 4, 851996, 131072, 4, 851997, 131072, 4, 917534, 524288, 1, 1048596, 131072, 4, 1048597, 131072, 4, 1048598, 131072, 4, 1048599, 196608, 4, 851992, 131072, 4, 1441817, 65536, 4, 1441818, 131072, 4, 1441819, 196608, 4, 1179671, 0, 3, 1245207, 262144, 4, 1310746, 0, 0, 1310742, 0, 4, 1245206, 0, 4, 1179670, 0, 4, 1114134, 0, 4, 1114133, 0, 4, 1114132, 0, 4, 1179668, 0, 4, 1179667, 0, 4, 1179666, 0, 4, 1179665, 0, 4, 1179664, 0, 4, 1245204, 0, 4, 1245205, 0, 4, 1179669, 0, 4, 1310741, 0, 4, 1376277, 0, 4, 1441813, 0, 4, 1441814, 0, 4, 1376278, 0, 4, 1376279, 0, 4, 1310743, 0, 4, 1310744, 0, 4, 1245208, 0, 4, 1179672, 0, 4, 1114136, 0, 4, 1048600, 0, 4, 983064, 0, 4, 917528, 0, 4, 917529, 0, 4, 917530, 0, 4, 917531, 0, 4, 917532, 0, 4, 917533, 0, 4, 1114135, 0, 4, 1114137, 0, 4, 1179673, 0, 4, 1245209, 0, 4, 1310745, 0, 4, 1245210, 0, 4, 1179674, 0, 4, 1114138, 0, 4, 1114139, 0, 4, 1179675, 0, 4, 1245211, 0, 4, 1310747, 0, 4, 1310748, 0, 4, 1245212, 0, 4, 1179676, 0, 4, 1114140, 0, 4, 1114141, 0, 4, 1179677, 0, 4, 1245213, 0, 4, 1310749, 0, 4, 1376285, 0, 4, 1376284, 0, 4, 1441820, 0, 4, 1507356, 0, 4, 1507355, 0, 4, 1507354, 0, 4, 1507353, 0, 4, 1507352, 0, 4, 1441816, 0, 4, 1376280, 0, 4, 1441815, 0, 4, 1572890, 0, 4, 1572891, 0, 4, 1441821, 0, 4, 1441822, 0, 4, 1376286, 0, 4, 1310750, 0, 4, 1245214, 0, 4, 1179678, 0, 4, 1114142, 0, 4, 1114143, 0, 4, 1179679, 0, 4, 1179680, 0, 4, 1114144, 0, 4, 1114145, 0, 4, 1179681, 0, 4) +layer_1/name = "floor" +layer_1/z_index = -10 +layer_1/tile_data = PackedInt32Array(65541, 0, 4, 131077, 0, 4, 196613, 0, 4, 262149, 0, 4, 262150, 0, 4, 196614, 0, 4, 131078, 0, 4, 65542, 0, 4, 6, 0, 4, 5, 0, 4, 327685, 0, 4, 327686, 0, 4, 7, 0, 4, 65543, 0, 4, 131079, 0, 4, 196615, 0, 4, 262151, 0, 4, 327687, 0, 4, 327688, 0, 4, 262152, 0, 4, 196616, 0, 4, 8, 0, 4, 65544, 0, 4, 131080, 0, 4, 327689, 0, 4, 262153, 0, 4, 262154, 0, 4, 327690, 0, 4, 327691, 0, 4, 262155, 0, 4, 196619, 0, 4, 196618, 0, 4, 196617, 0, 4) +layer_2/name = "wall" +layer_2/y_sort_enabled = true +layer_2/tile_data = PackedInt32Array(-65531, 131072, 4, -65530, 131072, 4, -65529, 131072, 4, -65528, 131072, 4, 131081, 65536, 4, 131082, 131072, 4, 131083, 131072, 4, -131067, 589824, 3, -131066, 589824, 3, -131065, 589824, 3, -131064, 589824, 3, 65547, 589824, 3, 65546, 589824, 3, 65545, 524288, 3) +layer_3/name = "top" +layer_3/z_index = 10 +layer_3/tile_data = PackedInt32Array(393221, 655360, 0, 393222, 655360, 0, 393223, 655360, 0, 393224, 655360, 0, 327684, 720896, 2, 262148, 720896, 2, 196612, 720896, 2, 131076, 720896, 2, 65540, 720896, 2, 4, 720896, 2, 9, 524288, 1, 393220, 393216, 1, -131063, 327680, 2, -131068, 393216, 2, -65527, 524288, 1, -65532, 720896, 2, 393225, 655360, 0, 393226, 655360, 0, 393227, 655360, 0, 65548, 327680, 2, 393228, 327680, 1, 327692, 524288, 1, 262156, 524288, 1, 196620, 524288, 1, 131084, 524288, 1) [node name="NavigationRegion2D" type="NavigationRegion2D" parent="TileMap2"] + +[node name="NormalLayer" type="Node2D" parent="TileMap2"] +z_index = -1 +y_sort_enabled = true + +[node name="Role0001" parent="TileMap2/NormalLayer" node_paths=PackedStringArray("HurtArea", "HurtCollision", "InteractiveArea", "InteractiveCollision", "TipRoot", "TipSprite", "AnimationPlayer", "MountPoint", "BackMountPoint", "MeleeAttackArea", "MeleeAttackCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("3_bo13a")] +position = Vector2(131, 62.5) +HurtArea = NodePath("../../YSortLayer/Role0001/HurtArea") +HurtCollision = NodePath("../../YSortLayer/Role0001/HurtArea/HurtCollision") +InteractiveArea = NodePath("../../YSortLayer/Role0001/InteractiveArea") +InteractiveCollision = NodePath("../../YSortLayer/Role0001/InteractiveArea/InteractiveCollision") +TipRoot = NodePath("../../YSortLayer/Role0001/TipRoot") +TipSprite = NodePath("../../YSortLayer/Role0001/TipRoot/TipSprite") +AnimationPlayer = NodePath("../../YSortLayer/Role0001/AnimationPlayer") +MountPoint = NodePath("../../YSortLayer/Role0001/MountPoint") +BackMountPoint = NodePath("../../YSortLayer/Role0001/BackMountPoint") +MeleeAttackArea = NodePath("../../YSortLayer/Role0001/MountPoint/MeleeAttackArea") +MeleeAttackCollision = NodePath("../../YSortLayer/Role0001/MountPoint/MeleeAttackArea/MeleeAttackCollision") +ShadowSprite = NodePath("../../YSortLayer/Role0001/ShadowSprite") +AnimatedSprite = NodePath("../../YSortLayer/Role0001/AnimatedSprite") +Collision = NodePath("../../YSortLayer/Role0001/Collision") +metadata/_edit_group_ = true + +[node name="AnimatedSprite" parent="TileMap2/NormalLayer/Role0001" index="2"] +material = SubResource("ShaderMaterial_7va3f") +animation = &"idle" + +[node name="Collision" parent="TileMap2/NormalLayer/Role0001" index="3"] +visible = false + +[node name="HurtArea" parent="TileMap2/NormalLayer/Role0001" index="4"] +visible = false + +[node name="InteractiveArea" parent="TileMap2/NormalLayer/Role0001" index="5"] +visible = false + +[node name="YSortLayer" type="Node2D" parent="TileMap2"] +y_sort_enabled = true +position = Vector2(9, 5) + +[node name="Role0001" parent="TileMap2/YSortLayer" instance=ExtResource("3_bo13a")] +position = Vector2(130, 47.5) +metadata/_edit_group_ = true + +[node name="AnimatedSprite" parent="TileMap2/YSortLayer/Role0001" index="2"] +material = SubResource("ShaderMaterial_7va3f") +animation = &"idle" + +[node name="Collision" parent="TileMap2/YSortLayer/Role0001" index="3"] +visible = false + +[node name="HurtArea" parent="TileMap2/YSortLayer/Role0001" index="4"] +visible = false + +[node name="InteractiveArea" parent="TileMap2/YSortLayer/Role0001" index="5"] +visible = false + +[editable path="TileMap2/NormalLayer/Role0001"] +[editable path="TileMap2/YSortLayer/Role0001"] diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs index 6d725a8..11d19a2 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -50,14 +50,14 @@ private int _roomMaxInterval = 6; //房间横轴分散程度 - private float _roomHorizontalMinDispersion = 0f; - private float _roomHorizontalMaxDispersion = 0.5f; + private float _roomHorizontalMinDispersion = 2f; + private float _roomHorizontalMaxDispersion = 2.5f; // private float _roomHorizontalMinDispersion = 0f; // private float _roomHorizontalMaxDispersion = 2f; //房间纵轴分散程度 - private float _roomVerticalMinDispersion = 0f; - private float _roomVerticalMaxDispersion = 0.5f; + private float _roomVerticalMinDispersion = 2f; + private float _roomVerticalMaxDispersion = 2.5f; // private float _roomVerticalMinDispersion = 0f; // private float _roomVerticalMaxDispersion = 2f; diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index 9701494..6f3bf7b 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -57,19 +57,19 @@ FillRect(GameConfig.FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One, roomInfo.Size - new Vector2(2, 2)); - FillRect(GameConfig.TopMapLayer, config.IN_LT, roomInfo.Position, Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_IN_LT, roomInfo.Position, Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Left, roomInfo.Position + new Vector2(0, 1), new Vector2(1, roomInfo.Size.Y - 2)); - FillRect(GameConfig.TopMapLayer, config.IN_LB, roomInfo.Position + new Vector2(0, roomInfo.Size.Y - 1), + FillRect(GameConfig.TopMapLayer, config.Wall_IN_LB, roomInfo.Position + new Vector2(0, roomInfo.Size.Y - 1), new Vector2(1, 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, roomInfo.Position + new Vector2(1, roomInfo.Size.Y - 1), new Vector2(roomInfo.Size.X - 2, 1)); - FillRect(GameConfig.TopMapLayer, config.IN_RB, + FillRect(GameConfig.TopMapLayer, config.Wall_IN_RB, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, roomInfo.Size.Y - 1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Right, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 1), new Vector2(1, roomInfo.Size.Y - 2)); - FillRect(GameConfig.TopMapLayer, config.IN_RT, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 0), + FillRect(GameConfig.TopMapLayer, config.Wall_IN_RT, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 0), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, roomInfo.Position + Vector2.Right, new Vector2(roomInfo.Size.X - 2, 1)); @@ -297,7 +297,7 @@ FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), + FillRect(GameConfig.TopMapLayer, config.Wall_IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, doorInfo.Cross, new Vector2(GameConfig.CorridorWidth - 1, 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Right, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 1), @@ -307,7 +307,7 @@ (doorDir2 == DoorDirection.E && doorDir1 == DoorDirection.S)) { FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, doorInfo.Cross, Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_RB, + FillRect(GameConfig.TopMapLayer, config.Wall_IN_RB, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, GameConfig.CorridorWidth - 1), Vector2.One); @@ -321,7 +321,7 @@ { FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_LB, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), + FillRect(GameConfig.TopMapLayer, config.Wall_IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Left, doorInfo.Cross, new Vector2(1, GameConfig.CorridorWidth - 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, doorInfo.Cross + new Vector2(1, GameConfig.CorridorWidth - 1), @@ -334,7 +334,7 @@ doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, GameConfig.CorridorWidth - 1), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.IN_LT, doorInfo.Cross, Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_IN_LT, doorInfo.Cross, Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, doorInfo.Cross + new Vector2(1, 0), new Vector2(GameConfig.CorridorWidth - 1, 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Left, doorInfo.Cross + new Vector2(0, 1), @@ -533,7 +533,7 @@ FillRect(GameConfig.TopMapLayer, config.TopMask, rect.Position - new Vector2(0, 2), new Vector2(rect.Size.X, 1)); FillRect(GameConfig.TopMapLayer, config.TopMask, rect.Position + new Vector2(0, rect.Size.Y), new Vector2(rect.Size.X, 1)); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, rect.Position - new Vector2(0, 1), new Vector2(rect.Size.X, 1)); - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Center, rect.Position, new Vector2(rect.Size.X, 1)); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Center, rect.Position, new Vector2(rect.Size.X, 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, rect.Position + new Vector2(0, rect.Size.Y - 1), new Vector2(rect.Size.X, 1)); } @@ -564,12 +564,12 @@ if (atlasCoords == config.Wall_Right.AutoTileCoords) { - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Left, rect.Position - new Vector2(1, 0), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Left, rect.Position - new Vector2(1, 0), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Out_LB, rect.Position - new Vector2(1, 1), Vector2.One); } else { - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Center, rect.Position - new Vector2(1, 0), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Center, rect.Position - new Vector2(1, 0), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, rect.Position - new Vector2(1, 1), Vector2.One); } @@ -610,12 +610,12 @@ if (atlasCoords == config.Wall_Left.AutoTileCoords) { - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Right, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(rect.Size.X, -1), Vector2.One); } else { - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Center, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Center, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, rect.Position + new Vector2(rect.Size.X, -1), Vector2.One); } @@ -690,8 +690,8 @@ { FillRect(GameConfig.TopMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(0, rect.Size.Y - 1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Out_LB, rect.Position + new Vector2(3, rect.Size.Y - 1), Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Right, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.WallVertical_Left, rect.Position + new Vector2(3, rect.Size.Y), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Left, rect.Position + new Vector2(3, rect.Size.Y), Vector2.One); FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, 0), new Vector2(2, 2)); diff --git a/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs b/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs index d32cc5c..f92b62f 100644 --- a/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs +++ b/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs @@ -7,36 +7,6 @@ /// public class AutoTileConfig { - public TileCellData IN_LT = new TileCellData(0, new Vector2I(3, 3)); - public TileCellData IN_LB = new TileCellData(0, new Vector2I(11, 2)); - public TileCellData IN_RT = new TileCellData(0, new Vector2I(1, 3)); - public TileCellData IN_RB = new TileCellData(0, new Vector2I(13, 2)); - - private List _middleLayerAtlasCoords = new List() - { - new Vector2I(1, 6), - new Vector2I(2, 6), - new Vector2I(3, 6), - new Vector2I(1, 7), - new Vector2I(2, 7), - new Vector2I(3, 7), - }; - - private List _topLayerAtlasCoords = new List() - { - new Vector2I(1, 4), - new Vector2I(1, 3), - new Vector2I(1, 2), - new Vector2I(2, 2), - new Vector2I(3, 2), - new Vector2I(3, 3), - new Vector2I(3, 4), - new Vector2I(11, 2), - new Vector2I(13, 2), - }; - - //----------------------------------------------------------- - public TileCellData Floor = new TileCellData(0, new Vector2I(0, 4)); public TileCellData TopMask; public TileCellData Wall_Bottom; @@ -47,12 +17,15 @@ public TileCellData Wall_Out_LT; public TileCellData Wall_Out_RB; public TileCellData Wall_Out_RT; + public TileCellData Wall_IN_LT; + public TileCellData Wall_IN_LB; + public TileCellData Wall_IN_RT; + public TileCellData Wall_IN_RB; - - public TileCellData WallVertical_Left = new TileCellData(0, new Vector2I(1, 4)); - public TileCellData WallVertical_Center = new TileCellData(0, new Vector2I(2, 4)); - public TileCellData WallVertical_Right = new TileCellData(0, new Vector2I(3, 4)); - public TileCellData WallVertical_Single = new TileCellData(0, new Vector2I(4, 4)); + public TileCellData Wall_Vertical_Left = new TileCellData(0, new Vector2I(1, 4)); + public TileCellData Wall_Vertical_Center = new TileCellData(0, new Vector2I(2, 4)); + public TileCellData Wall_Vertical_Right = new TileCellData(0, new Vector2I(3, 4)); + public TileCellData Wall_Vertical_Single = new TileCellData(0, new Vector2I(4, 4)); //----------------------------- 所有自动图块数据 ----------------------------- //----------------------------- 命名规则: Auto_ + LT + T + RT + _ + L + C + R + _ + LB + B + RB @@ -136,12 +109,18 @@ Wall_Left = Auto_110_110_110; Wall_Right = Auto_011_011_011; Wall_Top = Auto_111_111_000; + Wall_Out_LB = Auto_011_011_000; Wall_Out_LT = Auto_000_011_011; Wall_Out_RB = Auto_110_110_000; Wall_Out_RT = Auto_000_110_110; + + Wall_IN_LT = Auto_111_111_110; + Wall_IN_LB = Auto_110_111_111; + Wall_IN_RT = Auto_111_111_011; + Wall_IN_RB = Auto_011_111_111; } - + public int GetLayer2(Vector2I atlasCoords) { return atlasCoords == Floor.AutoTileCoords ? GameConfig.FloorMapLayer : GameConfig.TopMapLayer; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs index db2fcee..8e52743 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs @@ -755,19 +755,19 @@ TileCellData tileCellData; if (left && right) { - tileCellData = _autoTileConfig.WallVertical_Single; + tileCellData = _autoTileConfig.Wall_Vertical_Single; } else if (left) { - tileCellData = _autoTileConfig.WallVertical_Left; + tileCellData = _autoTileConfig.Wall_Vertical_Left; } else if (right) { - tileCellData = _autoTileConfig.WallVertical_Right; + tileCellData = _autoTileConfig.Wall_Vertical_Right; } else { - tileCellData = _autoTileConfig.WallVertical_Center; + tileCellData = _autoTileConfig.Wall_Vertical_Center; } SetCell(GetFloorLayer(), new Vector2I(x, y - 1), tileCellData.SourceId, tileCellData.AutoTileCoords); }