randomgeon/assets/projectiles/components/bolt.tscn
Dan Baker d0c2a7b3c8 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.
2025-05-05 16:42:51 +01:00

22 lines
886 B
Text

[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"]