added stamina and health bar, gold can now be picked up

This commit is contained in:
2025-06-25 21:07:48 -05:00
parent 3e506590a9
commit 60432795f2
9 changed files with 99 additions and 46 deletions

View File

@@ -3,7 +3,7 @@ class_name PlayerState
@export var move_speed = 10.0
@export var move_transition_speed = 10.0
@export var health_lost_on_fall = 2.0
@export var health_lost_on_fall = 20.0
# respawn after falling
const FALL_TIME_TO_RESPAWN : float = 3.0
@@ -32,6 +32,7 @@ func respawn_on_fall(delta):
else:
fall_timer = FALL_TIME_TO_RESPAWN
character.global_position = ground_pos_cached[0]
character.health -= health_lost_on_fall
func apply_gravity(delta):
if !character.is_on_floor():