diff --git a/Assets/scripts/vapelight.gd b/Assets/scripts/vapelight.gd index d75d532..68523a4 100644 --- a/Assets/scripts/vapelight.gd +++ b/Assets/scripts/vapelight.gd @@ -9,16 +9,17 @@ func _ready(): light_energy = 0 func _process(delta): - if is_vaping: - if light_energy < MaxPow: - light_energy += 1 * delta - else: + if GlobalSettings.HasVape: + if is_vaping: + if light_energy < MaxPow: + light_energy += 1 * delta + else: + if light_energy > 0: + light_energy -= .1 + if light_energy <= 0: + hide() if light_energy > 0: - light_energy -= .1 - if light_energy <= 0: - hide() - if light_energy > 0: - show() + show() func on(): is_vaping = true