Improved lightig by having it hide when light equals zero

This commit is contained in:
2024-04-07 13:56:24 -05:00
parent 4decae3778
commit 746a105820

View File

@ -1,7 +1,7 @@
extends SpotLight3D
var Power = 0.0
var MaxPow = 6
var MaxPow = 10
var is_vaping = false
func _ready():
@ -13,8 +13,12 @@ func _process(delta):
light_energy += 1 * delta
else:
if light_energy > 0:
light_energy -= .50
light_energy -= .1
if light_energy <= 0:
hide()
if light_energy > 0:
show()
func on():
is_vaping = true