Improved lightig by having it hide when light equals zero
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user