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
|
|||
|
||||
## Number of bullets to spawn along the line.
|
||||
@export var bullet_count: int
|
||||
## The speed that bullets will start with.
|
||||
@export var bullet_speed: float
|
||||
## Distance between the first and last bullet in the line.
|
||||
@export var line_width: float
|
||||
## The direction that spawned bullets will travel, orthogonal to the line of bullets.
|
||||
|
|
@ -14,6 +16,7 @@ extends BulletSpawnPattern
|
|||
func _spawn_bullets(bullet_set: BulletSet, preset: BulletPreset) -> void:
|
||||
for i in bullet_count:
|
||||
var bullet = Bullet.create(preset, line_normal.rotated(bullet_set.spawn_rotation))
|
||||
bullet.speed = bullet_speed
|
||||
|
||||
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