rework bullet speed a wee bit
This commit is contained in:
parent
ddf3590c96
commit
08763960ca
5 changed files with 16 additions and 11 deletions
|
|
@ -5,6 +5,8 @@ extends BulletSpawnPattern
|
|||
|
||||
## The number of bullets to spawn along the circle.
|
||||
@export var bullet_count: int = 3
|
||||
## The speed that bullets will start with.
|
||||
@export var bullet_speed: float
|
||||
## Radius of the circle that bullets spawn along the edge of.
|
||||
@export var radius: float
|
||||
## Rotation of the entire ring pattern.
|
||||
|
|
@ -17,5 +19,6 @@ func _spawn_bullets(bullet_set: BulletSet, preset: BulletPreset) -> void:
|
|||
for i in bullet_count:
|
||||
var angle = (float(i) / float(bullet_count)) * TAU + angle_offset + bullet_set.spawn_rotation
|
||||
var bullet = Bullet.create(preset, Vector2.from_angle(angle + direction_rotation))
|
||||
bullet.speed = bullet_speed
|
||||
bullet.position = bullet_set.spawn_offset + Vector2.from_angle(angle) * radius
|
||||
bullet_set.add_bullet(bullet)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue