rand bullets
This commit is contained in:
parent
55c2aeac80
commit
4ff19610d3
12 changed files with 126 additions and 56 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue