added stamina and health bar, gold can now be picked up
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user