Update stomach ui
This commit is contained in:
parent
3047245eae
commit
469813f534
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user