Scene hierarchy
- Main (Node2D)
- Camera2D
Codes
main.gd
extends Node2D
var starScene : PackedScene = preload("res://star.tscn")
func _ready() -> void:
for i in 50:
var star = starScene.instantiate()
add_child(star)
star.position.x = randf_range(-570,570)
star.position.y = randf_range(-320,320)
var star_scale = randf_range(2.0,5.0)
star.scale.x = star_scale
star.scale.y = star_scale
TODO
- Button to restart
- Ability to change paramers