27 lines
937 B
GDScript
27 lines
937 B
GDScript
class_name WeaponShot
|
|
extends Resource
|
|
|
|
@export_category("Parameters")
|
|
@export var shot_name: String
|
|
@export var bullet_scene: PackedScene = null
|
|
@export var damage: int = 1
|
|
@export var speed: int = 135
|
|
@export var projectiles: int = 2
|
|
# Vertical spacing between projectiles
|
|
@export var spacing: float = 35
|
|
# Origin offset from center of player
|
|
@export var origin: int = -23
|
|
|
|
@export_category("Spread")
|
|
# Horizontal distance between projectiles
|
|
@export var horizontal_offset: float = 6.5
|
|
# Total spread angle in degrees (only applied when projectiles >= 3)
|
|
@export var spread_angle: float = 0.0
|
|
# Time delay per projectile index
|
|
@export var stagger_offset: float = 0.25
|
|
|
|
@export_category("Effects")
|
|
# Offset animation playback per projectile index
|
|
@export var stagger_animation: bool = false
|
|
# Rotate projectiles to point along their travel direction (requires >2 projectiles and spread_angle > 0)
|
|
@export var follow_angle: bool = false
|