1
0
mirror of https://gitee.com/freeyz/godot-mota.git synced 2024-12-23 02:49:21 +08:00

增加5F楼层数据,修复4F怪物缺失问题

This commit is contained in:
freewu32 2020-09-03 16:36:33 +08:00
parent 28ab85d0f4
commit cf3835f53f
5 changed files with 163 additions and 7 deletions

View File

@ -5,4 +5,5 @@
[node name="HiddenDoor" instance=ExtResource( 1 )] [node name="HiddenDoor" instance=ExtResource( 1 )]
[node name="Sprite" parent="." index="1"] [node name="Sprite" parent="." index="1"]
modulate = Color( 1, 1, 1, 0.705882 )
animation = "hidden_door" animation = "hidden_door"

View File

@ -64,7 +64,6 @@ func load_scene_from_local(next_level:int) -> LevelInstance:
scene = load(path).instance() scene = load(path).instance()
else: else:
var init_path = "%sLevel%s.tscn" % [init_level_scene_path,next_level] var init_path = "%sLevel%s.tscn" % [init_level_scene_path,next_level]
print("init_path ",init_path)
scene = load(init_path).instance() scene = load(init_path).instance()
scene.name = "Level%s" % next_level scene.name = "Level%s" % next_level
return scene as LevelInstance return scene as LevelInstance

View File

@ -25,8 +25,6 @@ cell_quadrant_size = 1
format = 1 format = 1
tile_data = PoolIntArray( 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196611, 1, 0, 196612, 1, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 1, 0, 262144, 1, 0, 262145, 2, 0, 262146, 2, 0, 262147, 2, 0, 262148, 1, 0, 262149, 2, 0, 262150, 2, 0, 262151, 2, 0, 262152, 1, 0, 262153, 2, 0, 262154, 2, 0, 262155, 2, 0, 262156, 1, 0, 327680, 1, 0, 327681, 2, 0, 327682, 2, 0, 327683, 2, 0, 327684, 1, 0, 327685, 2, 0, 327686, 2, 0, 327687, 2, 0, 327688, 1, 0, 327689, 2, 0, 327690, 2, 0, 327691, 2, 0, 327692, 1, 0, 393216, 1, 0, 393217, 2, 0, 393218, 2, 0, 393219, 2, 0, 393220, 1, 0, 393221, 2, 0, 393222, 2, 0, 393223, 2, 0, 393224, 1, 0, 393225, 2, 0, 393226, 2, 0, 393227, 2, 0, 393228, 1, 0, 458752, 1, 0, 458753, 1, 0, 458754, 2, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 2, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0, 458762, 2, 0, 458763, 1, 0, 458764, 1, 0, 524288, 1, 0, 524289, 2, 0, 524290, 2, 0, 524291, 2, 0, 524292, 2, 0, 524293, 2, 0, 524294, 2, 0, 524295, 2, 0, 524296, 2, 0, 524297, 2, 0, 524298, 2, 0, 524299, 2, 0, 524300, 1, 0, 589824, 1, 0, 589825, 2, 0, 589826, 2, 0, 589827, 2, 0, 589828, 1, 0, 589829, 1, 0, 589830, 1, 0, 589831, 1, 0, 589832, 1, 0, 589833, 1, 0, 589834, 1, 0, 589835, 1, 0, 589836, 1, 0, 655360, 1, 0, 655361, 2, 0, 655362, 2, 0, 655363, 2, 0, 655364, 2, 0, 655365, 2, 0, 655366, 2, 0, 655367, 2, 0, 655368, 2, 0, 655369, 2, 0, 655370, 2, 0, 655371, 2, 0, 655372, 1, 0, 720896, 1, 0, 720897, 2, 0, 720898, 1, 0, 720899, 1, 0, 720900, 2, 0, 720901, 1, 0, 720902, 1, 0, 720903, 1, 0, 720904, 2, 0, 720905, 1, 0, 720906, 1, 0, 720907, 2, 0, 720908, 1, 0, 786432, 1, 0, 786433, 2, 0, 786434, 1, 0, 786435, 2, 0, 786436, 2, 0, 786437, 2, 0, 786438, 1, 0, 786439, 2, 0, 786440, 2, 0, 786441, 2, 0, 786442, 1, 0, 786443, 2, 0, 786444, 1, 0, 851968, 1, 0, 851969, 2, 0, 851970, 1, 0, 851971, 2, 0, 851972, 2, 0, 851973, 2, 0, 851974, 1, 0, 851975, 2, 0, 851976, 2, 0, 851977, 2, 0, 851978, 1, 0, 851979, 2, 0, 851980, 1, 0, 917504, 1, 0, 917505, 2, 0, 917506, 1, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 1, 0, 917511, 2, 0, 917512, 2, 0, 917513, 2, 0, 917514, 1, 0, 917515, 2, 0, 917516, 1, 0, 983040, 1, 0, 983041, 1, 0, 983042, 1, 0, 983043, 1, 0, 983044, 1, 0, 983045, 1, 0, 983046, 1, 0, 983047, 1, 0, 983048, 1, 0, 983049, 1, 0, 983050, 1, 0, 983051, 1, 0, 983052, 1, 0 ) tile_data = PoolIntArray( 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196611, 1, 0, 196612, 1, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 1, 0, 262144, 1, 0, 262145, 2, 0, 262146, 2, 0, 262147, 2, 0, 262148, 1, 0, 262149, 2, 0, 262150, 2, 0, 262151, 2, 0, 262152, 1, 0, 262153, 2, 0, 262154, 2, 0, 262155, 2, 0, 262156, 1, 0, 327680, 1, 0, 327681, 2, 0, 327682, 2, 0, 327683, 2, 0, 327684, 1, 0, 327685, 2, 0, 327686, 2, 0, 327687, 2, 0, 327688, 1, 0, 327689, 2, 0, 327690, 2, 0, 327691, 2, 0, 327692, 1, 0, 393216, 1, 0, 393217, 2, 0, 393218, 2, 0, 393219, 2, 0, 393220, 1, 0, 393221, 2, 0, 393222, 2, 0, 393223, 2, 0, 393224, 1, 0, 393225, 2, 0, 393226, 2, 0, 393227, 2, 0, 393228, 1, 0, 458752, 1, 0, 458753, 1, 0, 458754, 2, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 2, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0, 458762, 2, 0, 458763, 1, 0, 458764, 1, 0, 524288, 1, 0, 524289, 2, 0, 524290, 2, 0, 524291, 2, 0, 524292, 2, 0, 524293, 2, 0, 524294, 2, 0, 524295, 2, 0, 524296, 2, 0, 524297, 2, 0, 524298, 2, 0, 524299, 2, 0, 524300, 1, 0, 589824, 1, 0, 589825, 2, 0, 589826, 2, 0, 589827, 2, 0, 589828, 1, 0, 589829, 1, 0, 589830, 1, 0, 589831, 1, 0, 589832, 1, 0, 589833, 1, 0, 589834, 1, 0, 589835, 1, 0, 589836, 1, 0, 655360, 1, 0, 655361, 2, 0, 655362, 2, 0, 655363, 2, 0, 655364, 2, 0, 655365, 2, 0, 655366, 2, 0, 655367, 2, 0, 655368, 2, 0, 655369, 2, 0, 655370, 2, 0, 655371, 2, 0, 655372, 1, 0, 720896, 1, 0, 720897, 2, 0, 720898, 1, 0, 720899, 1, 0, 720900, 2, 0, 720901, 1, 0, 720902, 1, 0, 720903, 1, 0, 720904, 2, 0, 720905, 1, 0, 720906, 1, 0, 720907, 2, 0, 720908, 1, 0, 786432, 1, 0, 786433, 2, 0, 786434, 1, 0, 786435, 2, 0, 786436, 2, 0, 786437, 2, 0, 786438, 1, 0, 786439, 2, 0, 786440, 2, 0, 786441, 2, 0, 786442, 1, 0, 786443, 2, 0, 786444, 1, 0, 851968, 1, 0, 851969, 2, 0, 851970, 1, 0, 851971, 2, 0, 851972, 2, 0, 851973, 2, 0, 851974, 1, 0, 851975, 2, 0, 851976, 2, 0, 851977, 2, 0, 851978, 1, 0, 851979, 2, 0, 851980, 1, 0, 917504, 1, 0, 917505, 2, 0, 917506, 1, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 1, 0, 917511, 2, 0, 917512, 2, 0, 917513, 2, 0, 917514, 1, 0, 917515, 2, 0, 917516, 1, 0, 983040, 1, 0, 983041, 1, 0, 983042, 1, 0, 983043, 1, 0, 983044, 1, 0, 983045, 1, 0, 983046, 1, 0, 983047, 1, 0, 983048, 1, 0, 983049, 1, 0, 983050, 1, 0, 983051, 1, 0, 983052, 1, 0 )
script = ExtResource( 2 ) script = ExtResource( 2 )
navigation_cell_index = 2
wall_cell_index = 1
changed_cells = { changed_cells = {
} }
@ -76,43 +74,53 @@ position = Vector2( 80, 144 )
[node name="MonsterSprite" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 112, 336 ) position = Vector2( 112, 336 )
frame = 0 frame = 1
[node name="MonsterSprite4" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite4" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 144, 464 ) position = Vector2( 144, 464 )
frame = 0 frame = 1
[node name="MonsterSprite6" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite6" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 272, 464 ) position = Vector2( 272, 464 )
frame = 1
[node name="MonsterSprite7" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite7" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 272, 400 ) position = Vector2( 272, 400 )
animation = "bluePriest" animation = "bluePriest"
frame = 1
[node name="MonsterSprite8" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite8" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 80, 208 ) position = Vector2( 80, 208 )
animation = "bluePriest" animation = "bluePriest"
frame = 1
[node name="MonsterSprite9" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite9" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 304, 272 ) position = Vector2( 304, 272 )
animation = "skeleton" animation = "skeleton"
frame = 1
[node name="MonsterSprite10" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite10" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 336, 208 ) position = Vector2( 336, 208 )
animation = "skeletonSoilder" animation = "skeletonSoilder"
frame = 1
[node name="MonsterSprite5" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite5" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 112, 432 ) position = Vector2( 112, 432 )
frame = 1
[node name="MonsterSprite11" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 144, 400 )
animation = "bat"
[node name="MonsterSprite2" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite2" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 48, 336 ) position = Vector2( 48, 336 )
animation = "redSlime" animation = "redSlime"
frame = 0 frame = 1
[node name="MonsterSprite3" parent="Items" instance=ExtResource( 6 )] [node name="MonsterSprite3" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 208, 272 ) position = Vector2( 208, 272 )
animation = "redSlime" animation = "redSlime"
frame = 0 frame = 1
[node name="PlayerProps4" parent="Items" instance=ExtResource( 10 )] [node name="PlayerProps4" parent="Items" instance=ExtResource( 10 )]
position = Vector2( 306.1, 432 ) position = Vector2( 306.1, 432 )

139
src/levels/Level5.tscn Normal file
View File

@ -0,0 +1,139 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://src/level/LevelInstance.gd" type="Script" id=1]
[ext_resource path="res://src/navigation/NavigationTileset.tres" type="TileSet" id=2]
[ext_resource path="res://src/navigation/NavigationTileMap.gd" type="Script" id=3]
[ext_resource path="res://src/player/Player.tscn" type="PackedScene" id=4]
[ext_resource path="res://src/stairs/StairsDown.tscn" type="PackedScene" id=5]
[ext_resource path="res://src/stairs/StairsUp.tscn" type="PackedScene" id=6]
[ext_resource path="res://src/door/YellowDoor.tscn" type="PackedScene" id=7]
[ext_resource path="res://src/props/YellowKey.tscn" type="PackedScene" id=8]
[ext_resource path="res://src/props/RedDrug.tscn" type="PackedScene" id=9]
[ext_resource path="res://src/props/BlueGemstone.tscn" type="PackedScene" id=10]
[ext_resource path="res://src/props/IronSword.tscn" type="PackedScene" id=11]
[ext_resource path="res://src/monster/Monster.tscn" type="PackedScene" id=12]
[ext_resource path="res://src/door/HiddenDoor.tscn" type="PackedScene" id=13]
[node name="Level5" type="Node2D"]
script = ExtResource( 1 )
[node name="NavigationTileMap" type="TileMap" parent="."]
tile_set = ExtResource( 2 )
cell_size = Vector2( 32, 32 )
cell_quadrant_size = 1
format = 1
tile_data = PoolIntArray( 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196611, 1, 0, 196612, 1, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 1, 0, 262144, 1, 0, 262145, 2, 0, 262146, 1, 0, 262147, 2, 0, 262148, 2, 0, 262149, 2, 0, 262150, 2, 0, 262151, 1, 0, 262152, 2, 0, 262153, 2, 0, 262154, 2, 0, 262155, 2, 0, 262156, 1, 0, 327680, 1, 0, 327681, 2, 0, 327682, 1, 0, 327683, 2, 0, 327684, 2, 0, 327685, 1, 0, 327686, 2, 0, 327687, 1, 0, 327688, 2, 0, 327689, 2, 0, 327690, 1, 0, 327691, 2, 0, 327692, 1, 0, 393216, 1, 0, 393217, 2, 0, 393218, 2, 0, 393219, 2, 0, 393220, 2, 0, 393221, 1, 0, 393222, 2, 0, 393223, 1, 0, 393224, 2, 0, 393225, 2, 0, 393226, 1, 0, 393227, 2, 0, 393228, 1, 0, 458752, 1, 0, 458753, 1, 0, 458754, 1, 0, 458755, 1, 0, 458756, 2, 0, 458757, 1, 0, 458758, 2, 0, 458759, 1, 0, 458760, 2, 0, 458761, 2, 0, 458762, 1, 0, 458763, 2, 0, 458764, 1, 0, 524288, 1, 0, 524289, 2, 0, 524290, 2, 0, 524291, 2, 0, 524292, 2, 0, 524293, 1, 0, 524294, 2, 0, 524295, 1, 0, 524296, 1, 0, 524297, 1, 0, 524298, 1, 0, 524299, 2, 0, 524300, 1, 0, 589824, 1, 0, 589825, 2, 0, 589826, 2, 0, 589827, 2, 0, 589828, 2, 0, 589829, 1, 0, 589830, 2, 0, 589831, 2, 0, 589832, 2, 0, 589833, 2, 0, 589834, 2, 0, 589835, 2, 0, 589836, 1, 0, 655360, 1, 0, 655361, 1, 0, 655362, 2, 0, 655363, 1, 0, 655364, 1, 0, 655365, 1, 0, 655366, 2, 0, 655367, 1, 0, 655368, 1, 0, 655369, 1, 0, 655370, 1, 0, 655371, 2, 0, 655372, 1, 0, 720896, 1, 0, 720897, 2, 0, 720898, 2, 0, 720899, 2, 0, 720900, 2, 0, 720901, 1, 0, 720902, 2, 0, 720903, 1, 0, 720904, 2, 0, 720905, 2, 0, 720906, 2, 0, 720907, 2, 0, 720908, 1, 0, 786432, 1, 0, 786433, 2, 0, 786434, 2, 0, 786435, 2, 0, 786436, 2, 0, 786437, 1, 0, 786438, 2, 0, 786439, 1, 0, 786440, 2, 0, 786441, 1, 0, 786442, 1, 0, 786443, 1, 0, 786444, 1, 0, 851968, 1, 0, 851969, 1, 0, 851970, 1, 0, 851971, 1, 0, 851972, 1, 0, 851973, 1, 0, 851974, 2, 0, 851975, 1, 0, 851976, 2, 0, 851977, 1, 0, 851978, 2, 0, 851979, 2, 0, 851980, 1, 0, 917504, 1, 0, 917505, 2, 0, 917506, 2, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 2, 0, 917511, 1, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 1, 0, 983040, 1, 0, 983041, 1, 0, 983042, 1, 0, 983043, 1, 0, 983044, 1, 0, 983045, 1, 0, 983046, 1, 0, 983047, 1, 0, 983048, 1, 0, 983049, 1, 0, 983050, 1, 0, 983051, 1, 0, 983052, 1, 0 )
script = ExtResource( 3 )
changed_cells = {
}
[node name="Items" type="Node2D" parent="."]
[node name="HiddenDoor" parent="Items" instance=ExtResource( 13 )]
position = Vector2( 304, 464 )
enabled = true
[node name="Stairs2" parent="Items" instance=ExtResource( 6 )]
position = Vector2( 48, 144 )
[node name="Stairs" parent="Items" instance=ExtResource( 5 )]
position = Vector2( 48, 464 )
[node name="YellowDoor" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 144, 240 )
[node name="YellowDoor2" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 80, 208 )
[node name="YellowDoor3" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 176, 144 )
[node name="YellowDoor4" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 336, 144 )
[node name="YellowKey" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 48, 304 )
[node name="BlueGemstone" parent="Items" instance=ExtResource( 10 )]
position = Vector2( 48, 400 )
[node name="PlayerProps4" parent="Items" instance=ExtResource( 9 )]
position = Vector2( 112, 400 )
[node name="YellowKey8" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 80, 400 )
[node name="YellowKey2" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 48, 272 )
[node name="YellowKey3" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 208, 176 )
[node name="YellowKey4" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 272, 240 )
[node name="YellowKey5" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 304, 240 )
[node name="YellowKey6" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 272, 212 )
[node name="YellowKey7" parent="Items" instance=ExtResource( 8 )]
position = Vector2( 304, 212 )
[node name="IronSword" parent="Items" instance=ExtResource( 11 )]
position = Vector2( 368, 464 )
[node name="YellowDoor5" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 272, 400 )
[node name="MonsterSprite" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 272, 176 )
frame = 1
[node name="MonsterSprite5" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 210.1, 368 )
frame = 1
[node name="MonsterSprite6" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 240, 304 )
[node name="MonsterSprite7" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 144, 304 )
animation = "bat"
[node name="MonsterSprite10" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 112, 208 )
animation = "bat"
[node name="MonsterSprite8" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 112, 272 )
animation = "bluePriest"
[node name="MonsterSprite9" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 80, 336 )
animation = "skeletonSoilder"
frame = 1
[node name="MonsterSprite2" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 301.9, 176 )
frame = 1
[node name="MonsterSprite3" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 368, 176 )
animation = "redSlime"
frame = 1
[node name="MonsterSprite11" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 144, 144 )
animation = "redSlime"
frame = 1
[node name="MonsterSprite4" parent="Items" instance=ExtResource( 12 )]
position = Vector2( 368, 336 )
animation = "redSlime"
frame = 1
[node name="Player" parent="." instance=ExtResource( 4 )]
position = Vector2( 80, 464 )

9
src/props/IronSword.tscn Normal file
View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://src/props/RedGemstone.tscn" type="PackedScene" id=1]
[node name="IronSword" instance=ExtResource( 1 )]
update_value = 10
[node name="Sprite" parent="." index="0"]
region_rect = Rect2( 0, 1600, 32, 32 )