Fix pill level getting negative

This commit is contained in:
karl 2020-01-29 00:18:23 +01:00
parent ca1dc68f38
commit efb88dbb48

View File

@ -54,7 +54,8 @@ func _ready() -> void:
func _process(delta: float) -> void:
# Gradually decrease the level by the decrease per second
_level = _level - _decrease_per_second * delta
_set_level(_level - _decrease_per_second * delta)
if _prev_level > LEVELS.VERY_LOW and _level < LEVELS.VERY_LOW:
Logger.info("very low pill level")
emit_signal("very_low_pill_level")