From 97eae9c686a11d98dadf6200921500e8984ceaed Mon Sep 17 00:00:00 2001 From: Zakarya Date: Fri, 29 Mar 2024 19:58:11 -0700 Subject: [PATCH] Move exaust and regen speeds to the top of the script --- data/character/character.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/character/character.gd b/data/character/character.gd index 5ebe2bf..d6b5214 100644 --- a/data/character/character.gd +++ b/data/character/character.gd @@ -19,6 +19,8 @@ var status = { "health": 100, "stamina": 100, "exausted": false, + "exaust_speed": 1, + "stamina_regen_speed": 0.5, "level": 1 } var current_tool = "none" @@ -57,13 +59,13 @@ func _process(_delta): if is_sprinting: speed = sprint_speed - status.stamina -= 1 + status.stamina -= status.exaust_speed if status.stamina <= 0: is_sprinting = false status.exausted = true else: if status.stamina < 100: - status.stamina += 0.5 + status.stamina += status.stamina_regen_speed if status.exausted: speed = exausted_speed else: