Switch HUD into player scene

This commit is contained in:
Victor Turgeon
2022-10-11 13:48:59 -04:00
parent 0a352364d6
commit dce110a9b3
4 changed files with 141 additions and 127 deletions

View File

@@ -23,6 +23,7 @@ var gravity_vec = Vector3()
onready var head = $Head
onready var ground_check = $GroundCheck
onready var SlapGauge = $HUD/ActualHUD/SlapGauge
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
@@ -81,7 +82,7 @@ func _physics_process(delta):
else:
slap -= delta * 8.0;
slap = clamp(slap, 0.0, 1.0)
get_node("/root/Spatial/HUD/ActualHUD/SlapGauge").fill = slap;
SlapGauge.fill = slap;
direction = direction.normalized()