RadialLight.gd

 avatar
user_6134699
plain_text
a month ago
343 B
4
Indexable
Never
extends PointLight2D

var sun = null


# Called when the node enters the scene tree for the first time.
func _ready():
	sun = get_parent().get_parent().get_node("Sun")


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	if sun.energy < -0.4:
		self.visible = true
	else:
		self.visible = false
Leave a Comment