set up controller look
This commit is contained in:
@@ -38,7 +38,13 @@ func _ready() -> void:
|
||||
func _process(delta: float) -> void:
|
||||
player = level_control.player
|
||||
if player != null:
|
||||
#HEALTH
|
||||
health_bar.value = level_control.health
|
||||
if level_control.health <= 2:
|
||||
change_color(health_bar,RED_COLOR,10,delta)
|
||||
else:
|
||||
change_color(health_bar,FULL_WHITE,10,delta)
|
||||
#MONEY
|
||||
money.text = "$" + str(level_control.money)
|
||||
if player.remaining_stamina/player.MAX_STAMINA >= .99:
|
||||
stam_bar_visible = false
|
||||
@@ -61,10 +67,11 @@ func _process(delta: float) -> void:
|
||||
change_color(crosshair,FULL_WHITE,10,delta)
|
||||
|
||||
if player.interact_ray.is_colliding():
|
||||
if player.interact_ray.get_collider().is_in_group("interact"):
|
||||
interact_visible = true
|
||||
else:
|
||||
interact_visible = false
|
||||
if player.interact_ray.get_collider() != null:
|
||||
if player.interact_ray.get_collider().is_in_group("interact"):
|
||||
interact_visible = true
|
||||
else:
|
||||
interact_visible = false
|
||||
else:
|
||||
interact_visible = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user