Update stomach ui

This commit is contained in:
Daniel Snider 2022-08-18 21:59:09 -07:00
parent 3047245eae
commit 469813f534

View File

@ -39,6 +39,12 @@ func change_state(new_state):
new_state.enter_from(state)
state = new_state
func _process(delta):
if health > 0:
var hunger_timer = $"%hunger_timer"
var stomach = $"%stomachs".get_child(health - 1)
stomach.material.set_shader_param("percent", 1.0 - hunger_timer.time_left / hunger_timer.wait_time)
func _physics_process(delta):
state.physics_process(delta)