1
0
mirror of https://gitee.com/freeyz/godot-mota.git synced 2024-12-22 20:09:22 +08:00

修复10F封印门配置和玩家位置配置

This commit is contained in:
freewu32 2020-09-06 09:43:10 +08:00
parent 6281c69a52
commit 54266ede52
2 changed files with 25 additions and 9 deletions

View File

@ -5,7 +5,7 @@ export var left_monster_path : NodePath setget set_left_monster
export var right_monster_path : NodePath setget set_right_monster
export var count : int = 0
export var count : int = 0 setget set_count
func _ready():
var left_monster = get_node(left_monster_path)
@ -16,14 +16,17 @@ func _ready():
func set_left_monster(value):
print(value)
left_monster_path = value
count += 1
self.count += 1
func set_right_monster(value):
right_monster_path = value
count += 1
self.count += 1
func on_monster_dead():
count -= 1
self.count -= 1
func set_count(value):
count = value
if count == 0:
$AnimatedSprite.playing = true

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=2]
[gd_scene load_steps=13 format=2]
[ext_resource path="res://src/level/LevelInstance.gd" type="Script" id=1]
[ext_resource path="res://src/navigation/NavigationTileMap.gd" type="Script" id=2]
@ -10,6 +10,8 @@
[ext_resource path="res://src/props/RedGemstone.tscn" type="PackedScene" id=8]
[ext_resource path="res://src/props/BlueDrug.tscn" type="PackedScene" id=9]
[ext_resource path="res://src/stairs/StairsDown.tscn" type="PackedScene" id=10]
[ext_resource path="res://src/door/SealDoor.tscn" type="PackedScene" id=11]
[ext_resource path="res://src/player/Player.tscn" type="PackedScene" id=12]
[node name="Level10" type="Node2D"]
script = ExtResource( 1 )
@ -68,11 +70,11 @@ position = Vector2( 48, 304 )
animation = "skeleton"
[node name="MonsterSprite10" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 50.1, 208 )
position = Vector2( 48, 208 )
animation = "skeleton"
[node name="MonsterSprite11" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 82.1, 208 )
position = Vector2( 80, 208 )
animation = "skeleton"
[node name="MonsterSprite12" parent="Items" instance=ExtResource( 7 )]
@ -80,7 +82,7 @@ position = Vector2( 112, 208 )
animation = "skeleton"
[node name="MonsterSprite14" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 333.9, 240 )
position = Vector2( 336, 240 )
animation = "skeletonSoilder"
[node name="MonsterSprite15" parent="Items" instance=ExtResource( 7 )]
@ -92,7 +94,7 @@ position = Vector2( 336, 208 )
animation = "skeleton"
[node name="MonsterSprite17" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 365.9, 208 )
position = Vector2( 368, 208 )
animation = "skeleton"
[node name="MonsterSprite3" parent="Items" instance=ExtResource( 7 )]
@ -117,6 +119,17 @@ position = Vector2( 336, 304 )
[node name="StairsDown" parent="Items" instance=ExtResource( 10 )]
position = Vector2( 48, 464 )
[node name="SealDoor2" parent="Items" instance=ExtResource( 11 )]
position = Vector2( 272, 240 )
count = 1
[node name="SealDoor3" parent="Items" instance=ExtResource( 11 )]
position = Vector2( 144, 240 )
count = 1
[node name="MonsterSprite6" parent="Items" instance=ExtResource( 7 )]
position = Vector2( 368, 304 )
animation = "skeleton"
[node name="Player" parent="." instance=ExtResource( 12 )]
position = Vector2( 48, 432 )