bullets bullets bullets bullets
This commit is contained in:
parent
846040c0e4
commit
55059788b2
25 changed files with 139 additions and 91 deletions
|
|
@ -5,6 +5,10 @@ extends Node2D
|
|||
@export var preset: BulletPreset
|
||||
|
||||
|
||||
var spawn_offset: Vector2 = Vector2.ZERO
|
||||
var spawn_rotation: float = 0.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for _n in preset.rounds:
|
||||
preset.pattern.spawn_bullets(self, preset)
|
||||
|
|
@ -14,6 +18,10 @@ func _ready() -> void:
|
|||
func _physics_process(delta: float) -> void:
|
||||
if get_child_count() == 0:
|
||||
queue_free()
|
||||
|
||||
if preset.set_behavior:
|
||||
preset.set_behavior.process_set(self, delta)
|
||||
|
||||
for bullet in get_children():
|
||||
if bullet is Bullet:
|
||||
preset.behavior.process_bullet(bullet, delta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue