地牢新版地形开发中
1 parent f9879d0 commit ffb54b4d6db56e711cdb14c4a5afe750f3cc317e
@小李xl 小李xl authored on 28 Dec 2023
Showing 8 changed files
View
2
■■■
DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preinstall.json
[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":63,"Y":19},"Size":{"X":21,"Y":14},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]}]]}]
[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":63,"Y":19},"Size":{"X":21,"Y":14},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":47,"Y":-14},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]}]]}]
View
35
DungeonShooting_Godot/scene/World.tscn
glow_normalized = true
glow_strength = 1.05
glow_blend_mode = 1
 
[node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot")]
[node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot", "NavigationRoot")]
script = ExtResource("1_kt3mm")
NormalLayer = NodePath("NormalLayer")
YSortLayer = NodePath("YSortLayer")
NormalLayer = NodePath("TileRoot/NormalLayer")
YSortLayer = NodePath("TileRoot/YSortLayer")
TileRoot = NodePath("TileRoot")
StaticSpriteRoot = NodePath("StaticSpriteRoot")
AffiliationAreaRoot = NodePath("AffiliationAreaRoot")
FogMaskRoot = NodePath("FogMaskRoot")
StaticSpriteRoot = NodePath("TileRoot/StaticSpriteRoot")
AffiliationAreaRoot = NodePath("TileRoot/AffiliationAreaRoot")
FogMaskRoot = NodePath("TileRoot/FogMaskRoot")
NavigationRoot = NodePath("TileRoot/NavigationRoot")
metadata/_edit_vertical_guides_ = []
 
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_g06jj")
y_sort_enabled = true
format = 2
layer_0/name = "Floor"
layer_0/z_index = -10
layer_0/navigation_enabled = false
layer_1/name = "Middle"
layer_1/y_sort_enabled = true
layer_1/y_sort_origin = 7
layer_1/navigation_enabled = false
layer_1/tile_data = PackedInt32Array()
layer_2/name = "Top"
layer_2/modulate = Color(1, 1, 1, 0.784314)
layer_2/z_index = 10
layer_2/navigation_enabled = false
layer_2/tile_data = PackedInt32Array()
layer_3/name = "AisleFloor"
layer_3/z_index = -10
layer_3/navigation_enabled = false
layer_3/tile_data = PackedInt32Array()
 
[node name="StaticSpriteRoot" type="Node2D" parent="."]
[node name="NavigationRoot" type="Node2D" parent="TileRoot"]
z_index = -2
 
[node name="NormalLayer" type="Node2D" parent="."]
[node name="StaticSpriteRoot" type="Node2D" parent="TileRoot"]
z_index = -2
 
[node name="NormalLayer" type="Node2D" parent="TileRoot"]
z_index = -1
 
[node name="YSortLayer" type="Node2D" parent="."]
[node name="YSortLayer" type="Node2D" parent="TileRoot"]
y_sort_enabled = true
 
[node name="AffiliationAreaRoot" type="Node2D" parent="."]
[node name="AffiliationAreaRoot" type="Node2D" parent="TileRoot"]
 
[node name="FogMaskRoot" type="Node2D" parent="."]
[node name="FogMaskRoot" type="Node2D" parent="TileRoot"]
View
2
■■■
DungeonShooting_Godot/scene/test/TestNewTerrain.tscn
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/name = "middle"
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
View
167
DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs
{
FillRect(GameConfig.FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One,
roomInfo.Size - new Vector2(2, 2));
 
FillRect(GameConfig.TopMapLayer, config.Wall_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.Wall_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.Wall_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.Wall_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));
}
}
else
{
FullVerticalAisle(config, rect);
FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null);
FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null);
FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null);
FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null);
}
if (dir2 == 0)
{
}
else
{
FullVerticalAisle(config, rect2);
FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null);
FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null);
FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null);
FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null);
}
if ((doorDir1 == DoorDirection.N && doorDir2 == DoorDirection.E) || //↑→
(doorDir2 == DoorDirection.N && doorDir1 == DoorDirection.E))
{
FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT,
doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_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),
new Vector2(1, GameConfig.CorridorWidth - 1));
}
else if ((doorDir1 == DoorDirection.E && doorDir2 == DoorDirection.S) || //→↓
(doorDir2 == DoorDirection.E && doorDir1 == DoorDirection.S))
{
FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, doorInfo.Cross, Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_IN_RB,
doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1,
GameConfig.CorridorWidth - 1),
Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_Right, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0),
new Vector2(1, GameConfig.CorridorWidth - 1));
FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
new Vector2(GameConfig.CorridorWidth - 1, 1));
FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, doorInfo.Cross + new Vector2I(0, -1), Vector2.One);
FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, doorInfo.Cross, Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_In_RB, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, GameConfig.CorridorWidth - 1), Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_Right, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, -1), new Vector2(1, GameConfig.CorridorWidth));
FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), new Vector2(GameConfig.CorridorWidth - 1, 1));
}
else if ((doorDir1 == DoorDirection.S && doorDir2 == DoorDirection.W) || //↓←
(doorDir2 == DoorDirection.S && doorDir1 == DoorDirection.W))
{
FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_LB,
doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_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),
new Vector2(GameConfig.CorridorWidth - 1, 1));
}
else if ((doorDir1 == DoorDirection.W && doorDir2 == DoorDirection.N) || //←↑
(doorDir2 == DoorDirection.W && doorDir1 == DoorDirection.N))
{
FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT,
doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1,
GameConfig.CorridorWidth - 1),
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),
new Vector2(1, GameConfig.CorridorWidth - 1));
}
//在房间墙上开洞
switch (doorDir1)
{
case DoorDirection.E: //→
ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1),
new Vector2(1, rect.Size.Y - 2));
break;
case DoorDirection.W: //←
ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1),
new Vector2(1, rect.Size.Y - 2));
break;
case DoorDirection.S: //↓
ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1),
new Vector2(rect.Size.X - 2, 1));
break;
case DoorDirection.N: //↑
ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2),
new Vector2(rect.Size.X - 2, 1));
break;
}
switch (doorDir2)
{
case DoorDirection.E: //→
ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1),
new Vector2(1, rect2.Size.Y - 2));
break;
case DoorDirection.W: //←
ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1),
new Vector2(1, rect2.Size.Y - 2));
break;
case DoorDirection.S: //↓
ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1),
new Vector2(rect2.Size.X - 2, 1));
break;
case DoorDirection.N: //↑
ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0),
new Vector2(rect2.Size.X - 2, 1));
break;
}
FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, GameConfig.CorridorWidth - 1), Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_In_LT, doorInfo.Cross + new Vector2I(0, -1), Vector2.One);
FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, doorInfo.Cross + new Vector2(1, -1), new Vector2(GameConfig.CorridorWidth - 1, 1));
FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Center, doorInfo.Cross + new Vector2(1, 0), new Vector2(GameConfig.CorridorWidth - 1, 1));
FillRect(GameConfig.TopMapLayer, config.Wall_Left, doorInfo.Cross + new Vector2(0, 0), new Vector2(1, GameConfig.CorridorWidth));
}
// //在房间墙上开洞
// switch (doorDir1)
// {
// case DoorDirection.E: //→
// ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1),
// new Vector2(1, rect.Size.Y - 2));
// break;
// case DoorDirection.W: //←
// ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1),
// new Vector2(1, rect.Size.Y - 2));
// break;
// case DoorDirection.S: //↓
// ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1),
// new Vector2(rect.Size.X - 2, 1));
// break;
// case DoorDirection.N: //↑
// ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2),
// new Vector2(rect.Size.X - 2, 1));
// break;
// }
//
// switch (doorDir2)
// {
// case DoorDirection.E: //→
// ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1),
// new Vector2(1, rect2.Size.Y - 2));
// break;
// case DoorDirection.W: //←
// ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1),
// new Vector2(1, rect2.Size.Y - 2));
// break;
// case DoorDirection.S: //↓
// ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1),
// new Vector2(rect2.Size.X - 2, 1));
// break;
// case DoorDirection.N: //↑
// ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0),
// new Vector2(rect2.Size.X - 2, 1));
// break;
// }
}
//先计算范围
var x = int.MaxValue;
new Vector2(rect.Size.X - 2, 1));
}
else
{
FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, rect.Position + new Vector2(0, -1), Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, rect.Position + new Vector2(3, -1), Vector2.One);
ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, rect.Size.Y - 2), new Vector2(2, 2));
ClearRect(GameConfig.MiddleMapLayer, rect.Position + new Vector2(0, rect.Size.Y - 1), new Vector2(4, 2));
FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(0, rect.Size.Y - 1), Vector2.One);
FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One);
FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_LB, rect.Position + new Vector2(rect.Size.X - 1, rect.Size.Y - 1), Vector2.One);
FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Left, rect.Position + new Vector2(rect.Size.X - 1, rect.Size.Y), Vector2.One);
FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1));
ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, rect.Size.Y - 2), new Vector2(2, 2));
ClearRect(GameConfig.MiddleMapLayer, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(2, 1));
 
//生成门的导航区域
var x = rect.Position.X * GameConfig.TileCellSize;
var y = rect.Position.Y * GameConfig.TileCellSize;
FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
}
else
{
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.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);
ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, 0), new Vector2(2, 2));
FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, rect.Position + new Vector2(0, -1), Vector2.One);
FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, rect.Position + new Vector2(3, -1), 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));
//生成门的导航区域
var x = rect.Position.X * GameConfig.TileCellSize;
var y = rect.Position.Y * GameConfig.TileCellSize;
View
8
DungeonShooting_Godot/src/game/activity/role/player/Player.cs
//GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f);
//GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f);
// this.CallDelay(0.5f, () =>
// {
// var weapon = Create<Weapon>(Ids.Id_weapon0009);
// PickUpWeapon(weapon);
// PickUpWeapon(Create<Weapon>(Ids.Id_weapon0009));
// PickUpWeapon(Create<Weapon>(Ids.Id_weapon0008));
// PickUpWeapon(Create<Weapon>(Ids.Id_weapon0007));
// PickUpWeapon(Create<Weapon>(Ids.Id_weapon0006));
// });
//注册状态机
StateController.Register(new PlayerIdleState());
View
DungeonShooting_Godot/src/game/room/AutoTileConfig.cs
View
DungeonShooting_Godot/src/game/room/DungeonManager.cs
View
DungeonShooting_Godot/src/game/room/World.cs