Improves projectile handling and modifiers
Refactors projectile spawning to allow for customized spawn locations and stat assignment. Applies modifiers to projectiles at the time of spawning, enabling dynamic adjustments to projectile behavior.
This commit is contained in:
parent
70839387ca
commit
fac3327c22
6 changed files with 74 additions and 11 deletions
|
|
@ -10,6 +10,7 @@ var emitting = true
|
|||
var final_goal: Vector2
|
||||
@export var angle_var: float = 15
|
||||
@onready var line: Line2D = $Line2D
|
||||
#@onready var particles: CPUParticles2D = $Particles
|
||||
|
||||
func _ready():
|
||||
line.width = 2
|
||||
|
|
@ -48,6 +49,7 @@ func update_points():
|
|||
curr_line_len = start_point.length()
|
||||
|
||||
points.append(final_goal)
|
||||
#particles.position = final_goal
|
||||
|
||||
func set_line_width(amount):
|
||||
line.width = amount
|
||||
|
|
@ -19,4 +19,9 @@ gradient = SubResource("Gradient_rrby1")
|
|||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
||||
[node name="Particles" type="CPUParticles2D" parent="."]
|
||||
visible = false
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 6.9
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue