rand bullets
This commit is contained in:
parent
55c2aeac80
commit
4ff19610d3
12 changed files with 126 additions and 56 deletions
|
|
@ -7,14 +7,9 @@ extends BulletSpawnPattern
|
|||
@export_custom(0, "direction") var line_normal: Vector2 = Vector2.RIGHT
|
||||
|
||||
|
||||
func spawn_bullets(bullet_set: BulletSet, preset: BulletPreset) -> void:
|
||||
func _spawn_bullets(bullet_set: BulletSet, preset: BulletPreset) -> void:
|
||||
for i in bullet_count:
|
||||
var bullet = Bullet.create(
|
||||
preset.textures.pick_random(),
|
||||
preset.hitbox_size,
|
||||
line_normal,
|
||||
preset.face_direction
|
||||
)
|
||||
var bullet = Bullet.create(preset, line_normal)
|
||||
|
||||
var line = line_normal.orthogonal().rotated(bullet_set.spawn_rotation)
|
||||
var weight = float(i) / float(bullet_count - 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue