This commit is contained in:
2026-07-01 20:31:41 +02:00
commit 764d4b15f0
104 changed files with 3665 additions and 0 deletions

33
levels/level_1/spawner.gd Normal file
View File

@@ -0,0 +1,33 @@
extends Node2D
@export
var spawnee: PackedScene
@export
var initial_spawn_amount: int = 4
@export
var score_label: Label
var score: int = 0
func _ready() -> void:
score_label.text = str(score)
for i in range(initial_spawn_amount):
spawn()
func spawn() -> void:
var new_spawnee: Node2D = spawnee.instantiate()
new_spawnee.position = Vector2(randi_range(40, 280), randi_range(40, 200))
new_spawnee.killed.connect(on_killed)
add_child(new_spawnee)
func on_killed():
score += 1
score_label.text = str(score)