mirror of
https://gitee.com/freeyz/godot-mota.git
synced 2024-12-22 21:29:23 +08:00
修复读取存档数据不更新的bug
This commit is contained in:
parent
9c13024e58
commit
8b83032c44
@ -208,7 +208,7 @@ __meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ExpLabel" type="Label" parent="HUD/HeaderBackground/GridContainer2"]
|
||||
[node name="MoneyLabel" type="Label" parent="HUD/HeaderBackground/GridContainer2"]
|
||||
margin_left = 170.0
|
||||
margin_top = 5.0
|
||||
margin_right = 252.0
|
||||
|
@ -14,8 +14,8 @@ func get_atk_view() -> Label:
|
||||
func get_def_view() -> Label:
|
||||
return $"HeaderBackground/GridContainer2/DefLabel" as Label
|
||||
|
||||
func get_exp_view() -> Label:
|
||||
return $"HeaderBackground/GridContainer2/ExpLabel" as Label
|
||||
func get_money_view() -> Label:
|
||||
return $"HeaderBackground/GridContainer2/MoneyLabel" as Label
|
||||
|
||||
func get_yellow_key_view() -> Label:
|
||||
return $"HeaderBackground/GridContainer3/YellowKeyCount" as Label
|
||||
|
@ -36,10 +36,11 @@ func load_data(next_level:int):
|
||||
var next_scene = load_scene_from_local(next_level) as LevelInstance
|
||||
add_child(next_scene)
|
||||
get_current_level_instance().free()
|
||||
$"/root/Main".on_level_changed(next_level)
|
||||
load_data_from_local(next_level)
|
||||
#设置数据
|
||||
level = next_level
|
||||
emit_signal("level_changed",next_level)
|
||||
#emit_signal("level_changed",next_level)
|
||||
|
||||
# 设置楼层和位置
|
||||
func set_level_and_position(next_level:int,position:Vector2):
|
||||
|
@ -96,22 +96,27 @@ position = Vector2( 240, 272 )
|
||||
[node name="MonsterSprite2" parent="Items" instance=ExtResource( 16 )]
|
||||
position = Vector2( 112, 272 )
|
||||
animation = "bat"
|
||||
frame = 0
|
||||
|
||||
[node name="MonsterSprite6" parent="Items" instance=ExtResource( 16 )]
|
||||
position = Vector2( 336, 176 )
|
||||
animation = "bat"
|
||||
frame = 0
|
||||
|
||||
[node name="MonsterSprite3" parent="Items" instance=ExtResource( 16 )]
|
||||
position = Vector2( 48, 208 )
|
||||
animation = "bluePriest"
|
||||
frame = 0
|
||||
|
||||
[node name="MonsterSprite5" parent="Items" instance=ExtResource( 16 )]
|
||||
position = Vector2( 336, 368 )
|
||||
animation = "bluePriest"
|
||||
frame = 0
|
||||
|
||||
[node name="MonsterSprite4" parent="Items" instance=ExtResource( 16 )]
|
||||
position = Vector2( 48, 336 )
|
||||
animation = "skeleton"
|
||||
frame = 0
|
||||
|
||||
[node name="YellowDoor5" parent="Items" instance=ExtResource( 8 )]
|
||||
position = Vector2( 304, 464 )
|
||||
|
Loading…
Reference in New Issue
Block a user