now correctly removes player and enemy monster node
This commit is contained in:
parent
4963131d3e
commit
c9458f3627
3 changed files with 7 additions and 4 deletions
|
|
@ -127,6 +127,8 @@ func handle_battle() -> void:
|
||||||
UI.battle_ui.set_message("You won!")
|
UI.battle_ui.set_message("You won!")
|
||||||
await get_tree().create_timer(3.0).timeout
|
await get_tree().create_timer(3.0).timeout
|
||||||
battle_state = Global.BattleState.NOT_IN_BATTLE
|
battle_state = Global.BattleState.NOT_IN_BATTLE
|
||||||
|
enemy.queue_free()
|
||||||
|
player_monster.queue_free()
|
||||||
UI.ingame_menu.update()
|
UI.ingame_menu.update()
|
||||||
UI.show_battle_ui(false)
|
UI.show_battle_ui(false)
|
||||||
UI.show_ingame_controls(true)
|
UI.show_ingame_controls(true)
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,10 @@ func _on_close_button_pressed() -> void:
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
func update() -> void:
|
func update() -> void:
|
||||||
_update_monster_list()
|
pass
|
||||||
|
|
||||||
func _update_monster_list() -> void:
|
func _update_monster_list() -> void:
|
||||||
|
print("update list")
|
||||||
for i in SaveManager.current_save.party.size():
|
for i in SaveManager.current_save.party.size():
|
||||||
var monster = SaveManager.current_save.party[i]
|
var monster = SaveManager.current_save.party[i]
|
||||||
var entry = monster_list_entry.instantiate()
|
var entry = monster_list_entry.instantiate()
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
extends HBoxContainer
|
extends HBoxContainer
|
||||||
class_name PartyListEntry
|
class_name PartyListEntry
|
||||||
|
|
||||||
func populate(monster) -> void:
|
func populate(monster: MonsterData) -> void:
|
||||||
%MonsterID.text = str(0)
|
%MonsterID.text = str(0)
|
||||||
%MonsterName.text = monster.name
|
%MonsterName.text = monster.name
|
||||||
%MonsterLevel.text = "Lvl. %s" % monster.level
|
%MonsterLevel.text = "Lvl. %s" % monster.level
|
||||||
%HealthProgressBar.value = monster.health
|
%HealthProgressBar.value = monster.current_health
|
||||||
%HealthProgressBar.max_value = monster.health
|
%HealthProgressBar.max_value = monster.health
|
||||||
%ExperienceProgressBar.value = monster.xp
|
%ExperienceProgressBar.value = monster.xp
|
||||||
%ExperienceProgressBar.max_value = monster.base_xp
|
%ExperienceProgressBar.max_value = monster.base_xp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue