1
Fork 0
mirror of https://github.com/Steffo99/watermelonkeys-patched-ld51.git synced 2024-11-21 23:54:19 +00:00
fading-sun/light.gd
AndreaTerenz f31eb7d496 lights
2022-10-03 16:32:11 +02:00

22 lines
634 B
GDScript3

extends Area2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
#randomize()
var light_types = $Sprite.frames.get_animation_names()
$Sprite.animation = light_types[randi() % light_types.size()]
#var x_range = Vector2(14, 737)
#var y_range = Vector2(134, 345)
#var random_x = randi() % int(x_range[1]- x_range[0]) + 1 + x_range[0]
#var random_y = randi() % int(y_range[1]-y_range[0]) + 1 + y_range[0]
#var random_pos = Vector2(random_x, random_y)
#$Sprite.position = random_pos
#$Light2D.position = random_pos