Adds lightning projectile
Implements a lightning projectile with visual effects. The lightning is created using a series of bolt components that dynamically adjust their shape. Also refactors the projectile system to use a base class. Removes unused modifiers from player script.
This commit is contained in:
parent
ff62d67f54
commit
d0c2a7b3c8
12 changed files with 239 additions and 103 deletions
22
assets/projectiles/components/bolt.tscn
Normal file
22
assets/projectiles/components/bolt.tscn
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cafaf3en63bp6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bshl5y6qhgv2b" path="res://assets/projectiles/components/bolt.gd" id="1_rrby1"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_sbfhf"]
|
||||
_data = [Vector2(0.0154639, 0.409091), 0.0, 0.0, 0, 0, Vector2(0.448454, 0.981818), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_rrby1"]
|
||||
offsets = PackedFloat32Array(0.0264901, 0.0993377, 0.84106, 1)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0.865385, 1, 1, 1, 0)
|
||||
|
||||
[node name="Bolt" type="Node2D"]
|
||||
script = ExtResource("1_rrby1")
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="."]
|
||||
width_curve = SubResource("Curve_sbfhf")
|
||||
gradient = SubResource("Gradient_rrby1")
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue