added functionality for various game modes
This commit is contained in:
@@ -50,7 +50,7 @@ func _ready() -> void:
|
||||
SignalBus.player_hit.connect(player_hit)
|
||||
SignalBus.shot_fired.connect(crosshair_size_change)
|
||||
|
||||
health_bar.max_value = level_control.start_health
|
||||
health_bar.max_value = level_control.gamemode.start_health
|
||||
|
||||
health_bar_start_pos = health_bar.position
|
||||
|
||||
@@ -88,7 +88,7 @@ func _process(delta: float) -> void:
|
||||
if level_control.health <= 2:
|
||||
change_color(health_bar,RED_COLOR,10,delta)
|
||||
health_bar.position = health_bar_start_pos + shake_element(15)
|
||||
elif level_control.health < ((level_control.start_health / 2) + 1):
|
||||
elif level_control.health < ((level_control.gamemode.start_health / 2) + 1):
|
||||
change_color(health_bar,ORANGE_COLOR,10,delta)
|
||||
else:
|
||||
change_color(health_bar,FULL_WHITE,10,delta)
|
||||
@@ -104,7 +104,7 @@ func _process(delta: float) -> void:
|
||||
change_color(money,FULL_WHITE,10,delta)
|
||||
|
||||
money.text = "$" + str(money_count)
|
||||
if player.remaining_stamina/player.MAX_STAMINA >= .99:
|
||||
if player.remaining_stamina/level_control.gamemode.max_stamina >= .99:
|
||||
stam_bar_visible = false
|
||||
else:
|
||||
stam_bar_visible = true
|
||||
|
||||
Reference in New Issue
Block a user