From 1e6058c2cdf39d065d156c5ba288e8085fa9212c Mon Sep 17 00:00:00 2001 From: tonydero Date: Thu, 24 Oct 2024 08:47:58 -0600 Subject: [PATCH] comment out last two references to old PlayerState.current_health --- scripts/Player.gd | 14 +++++++------- scripts/PlayerState.gd | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/Player.gd b/scripts/Player.gd index 3f3d359..80ac6e5 100644 --- a/scripts/Player.gd +++ b/scripts/Player.gd @@ -28,13 +28,13 @@ func _on_enemy_died(enemyDifficulty, enemyTier, _enemyFaction) -> void: # use xp to next level and current level, subtract, figure out percentage per point exp, add to display? -func _get_player_current_health() -> void: - var playerCurrHeath = PlayerState.current_health - $PlayerHealthBar/PlayerHealthCurrent.text = str(playerCurrHeath) - $PlayerHealthBar.value = playerCurrHeath - if playerCurrHeath <= 0: - %PlayerInfo/PlayerHealthBar.value = 0 - Engine.time_scale = 0.0001 +# func _get_player_current_health() -> void: +# var playerCurrHeath = PlayerState.current_health +# $PlayerHealthBar/PlayerHealthCurrent.text = str(playerCurrHeath) +# $PlayerHealthBar.value = playerCurrHeath +# if playerCurrHeath <= 0: +# %PlayerInfo/PlayerHealthBar.value = 0 +# Engine.time_scale = 0.0001 func _set_player_display() -> void: diff --git a/scripts/PlayerState.gd b/scripts/PlayerState.gd index 237592d..c3b7955 100644 --- a/scripts/PlayerState.gd +++ b/scripts/PlayerState.gd @@ -9,6 +9,6 @@ var experience := 0.0 var level := 1.0 var max_health := constitution * 100 # TEST: change current health to var on player and use signals to take damage? -var current_health := max_health +# var current_health := max_health var max_resource := 100 var weapon_type: Globals.Weapon.WeaponType