paratate/systems/bullets/set_behaviors/rotation_set_behavior.gd

14 lines
618 B
GDScript

class_name RotationSetBehavior
extends BulletSetBehavior
## Applies rotational motion to a [BulletSet].
## Speed at which the set rotates, including existing child [Bullet]s and [BulletSet]s.
@export_custom(0, "radians_as_degrees,suffix:°/s") var rotation_speed: float = 0.0
## Speed at which the rotation offset of spawned bullet patterns will change.
@export_custom(0, "radians_as_degrees,suffix:°/s") var spawn_rotation_speed: float = 0.0
func _process_set(bullet_set: BulletSet, delta: float) -> void:
bullet_set.rotation += rotation_speed * delta
bullet_set.spawn_rotation += spawn_rotation_speed * delta