rand bullets

This commit is contained in:
Haze Weathers 2026-01-01 16:27:43 -06:00
parent 55c2aeac80
commit 4ff19610d3
12 changed files with 126 additions and 56 deletions

View file

@ -10,9 +10,7 @@ var spawn_rotation: float = 0.0
func _ready() -> void:
for _n in preset.rounds:
preset.pattern.spawn_bullets(self, preset)
await get_tree().create_timer(preset.round_delay, false, true).timeout
_spawn_rounds()
func _physics_process(delta: float) -> void:
@ -36,3 +34,9 @@ func add_bullets(new_bullets: Array[Bullet]) -> void:
for bullet in new_bullets:
preset.behavior.init_bullet(bullet)
add_child(bullet)
func _spawn_rounds() -> void:
for _n in preset.rounds:
preset.pattern.spawn_bullets(self, preset)
await get_tree().create_timer(preset.round_delay, false, true).timeout