[gd_scene load_steps=12 format=2]

[ext_resource path="res://src/Actors/ligt_beam.png" type="Texture" id=1]
[ext_resource path="res://src/Actors/LightBeam.gd" type="Script" id=2]
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=3]

[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.189655, 0.366379, 0.616379, 1 )
colors = PoolColorArray( 1, 1, 1, 1, 0, 0.992157, 0.894118, 1, 0.844238, 0.964844, 0.95297, 0.826387, 0.0330963, 0.941406, 0.852792, 0.712057, 0.0627451, 0.992157, 0.901961, 0.203922 )

[sub_resource type="GradientTexture" id=2]
gradient = SubResource( 1 )

[sub_resource type="Curve" id=3]
_data = [ Vector2( 0.00784314, 0.894318 ), 0.0, 1.34604, 0, 0, Vector2( 1, 0.237591 ), 0.0, 0.0, 0, 0 ]

[sub_resource type="CurveTexture" id=4]
curve = SubResource( 3 )

[sub_resource type="ParticlesMaterial" id=5]
emission_shape = 1
emission_sphere_radius = 1.0
flag_disable_z = true
direction = Vector3( 0, 0, 0 )
gravity = Vector3( 0, 0, 0 )
angular_velocity = 0.2
angular_velocity_random = 1.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
angle = 90.0
angle_random = 0.6
scale = 0.7
scale_random = 0.5
scale_curve = SubResource( 4 )
color_ramp = SubResource( 2 )

[sub_resource type="CircleShape2D" id=6]
radius = 3.0

[sub_resource type="Animation" id=7]
resource_name = "lights_on"
length = 0.5
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Light2D:texture_scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 3.0, 4.0, 3.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Light2D:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.25, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -86.4, 33.4 ]
}

[sub_resource type="Animation" id=8]
length = 0.5
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Light2D:energy")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 2.0, 0.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Light2D:texture_scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.25, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 2.0, 1.5, 2.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Light2D:rotation_degrees")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.25, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -86.4, 0.0 ]
}

[node name="LightBeam" type="Particles2D"]
amount = 50
lifetime = 0.4
explosiveness = 0.1
local_coords = false
process_material = SubResource( 5 )
texture = ExtResource( 1 )
script = ExtResource( 2 )

[node name="Light2D" type="Light2D" parent="."]
rotation = -1.20637
texture = ExtResource( 3 )
texture_scale = 3.8
color = Color( 0.87451, 0.976471, 0.984314, 0.866667 )
range_item_cull_mask = 15375
shadow_enabled = true
shadow_item_cull_mask = 30

[node name="Area2D" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 2147483660

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 6 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "lights_on"
anims/lights_on = SubResource( 7 )
anims/lights_out = SubResource( 8 )
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
