[gd_scene load_steps=11 format=2]

[ext_resource path="res://assets/contraption/FlyingLaserCutterShaded.png" type="Texture" id=1]
[ext_resource path="res://src/Platforms/FlyingLaserCutter.gd" type="Script" id=2]
[ext_resource path="res://src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader" type="Shader" id=3]
[ext_resource path="res://assets/Sprite-0001.png" type="Texture" id=4]

[sub_resource type="Animation" id=2]
length = 2.4
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0 ]
}

[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 11.5, 12 )

[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 3.067, 10 )

[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 0.5, 11 )

[sub_resource type="ShaderMaterial" id=8]
resource_local_to_scene = true
shader = ExtResource( 3 )
shader_param/bits = 1.0
shader_param/pixel_offset = 0.0
shader_param/total_distance = 100.0
shader_param/wave1 = 1.0
shader_param/wave2 = 0.0
shader_param/wave3 = 0.0
shader_param/wave1_color = Color( 1, 1, 1, 0.764706 )
shader_param/wave2_color = Color( 0.945098, 0.392157, 0.121569, 0.176471 )
shader_param/wave3_color = Color( 0.945098, 0.392157, 0.121569, 1 )
shader_param/wave_frequency = 0.231
shader_param/wave_amplitude = 0.041
shader_param/wave_offset = 0.5
shader_param/traveling = 1.0
shader_param/travel_speed = -0.618
shader_param/oscilating = 1.0
shader_param/oscilation_speed = 0.2

[sub_resource type="ShaderMaterial" id=7]
resource_local_to_scene = true
shader = ExtResource( 3 )
shader_param/bits = 1.0
shader_param/pixel_offset = 0.0
shader_param/total_distance = 100.0
shader_param/wave1 = 1.0
shader_param/wave2 = 0.0
shader_param/wave3 = 0.0
shader_param/wave1_color = Color( 1, 1, 1, 0.764706 )
shader_param/wave2_color = Color( 0.945098, 0.392157, 0.121569, 0.176471 )
shader_param/wave3_color = Color( 0.945098, 0.392157, 0.121569, 1 )
shader_param/wave_frequency = 0.231
shader_param/wave_amplitude = 0.041
shader_param/wave_offset = 0.5
shader_param/traveling = 1.0
shader_param/travel_speed = -0.618
shader_param/oscilating = 1.0
shader_param/oscilation_speed = 0.2

[node name="FlyingLaserCutter" type="Node2D"]
script = ExtResource( 2 )
return_velocity = 80.0
initial_velocity = 30.0
max_velocity = 190.0
acceleration_force = 1000.0

[node name="FlyingLaserCutterBody" type="KinematicBody2D" parent="."]
collision_layer = 32
collision_mask = 57
collision/safe_margin = 0.001
motion/sync_to_physics = true

[node name="Sprite" type="Sprite" parent="FlyingLaserCutterBody"]
texture = ExtResource( 1 )
hframes = 5
vframes = 5
__meta__ = {
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUZseWluZ0xhc2VyQ3V0dGVyQm9keS9TcHJpdGUvQW5pbWF0aW9uUGxheWVyCnNvdXJjZXw9cmVzOi8vYXNzZXRzL2NvbnRyYXB0aW9uL0ZseWluZ0xhc2VyQ3V0dGVyLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K"
}

[node name="AnimationPlayer" type="AnimationPlayer" parent="FlyingLaserCutterBody/Sprite"]
anims/default = SubResource( 2 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="FlyingLaserCutterBody"]
shape = SubResource( 3 )

[node name="LaserArea" type="Area2D" parent="FlyingLaserCutterBody" groups=["harmful"]]
process_priority = -1
position = Vector2( 10, 0 )
collision_layer = 32
collision_mask = 3

[node name="PainZone" type="CollisionShape2D" parent="FlyingLaserCutterBody/LaserArea" groups=["harmful"]]
process_priority = -1
position = Vector2( -9.53674e-07, 0 )
shape = SubResource( 4 )

[node name="BackArea" type="Area2D" parent="FlyingLaserCutterBody"]
position = Vector2( -11.5, 0 )
collision_layer = 16
collision_mask = 3
monitorable = false

[node name="CollisionShape2D" type="CollisionShape2D" parent="FlyingLaserCutterBody/BackArea"]
position = Vector2( -1, 0 )
shape = SubResource( 5 )

[node name="Triggers" type="Node2D" parent="FlyingLaserCutterBody"]
position = Vector2( 0, 0.0077219 )

[node name="RayCast2D" type="RayCast2D" parent="FlyingLaserCutterBody/Triggers"]
position = Vector2( 9, 9 )
rotation = -1.5708
scale = Vector2( 1, 5000 )
enabled = true
cast_to = Vector2( 0, 1 )
collision_mask = 9

[node name="RayCast2D2" type="RayCast2D" parent="FlyingLaserCutterBody/Triggers"]
position = Vector2( 9, -9 )
rotation = -1.5708
scale = Vector2( 1, 5000 )
enabled = true
cast_to = Vector2( 0, 1 )
collision_mask = 9

[node name="TriggerTextures" type="Node2D" parent="FlyingLaserCutterBody"]
z_index = -1

[node name="Texture" type="Sprite" parent="FlyingLaserCutterBody/TriggerTextures"]
material = SubResource( 8 )
position = Vector2( 82, 15 )
scale = Vector2( 1, -1 )
texture = ExtResource( 4 )
offset = Vector2( 2430, 4 )
region_rect = Rect2( 2106.25, 268.196, 8.5918, 0 )

[node name="Texture2" type="Sprite" parent="FlyingLaserCutterBody/TriggerTextures"]
material = SubResource( 7 )
position = Vector2( 82, -6 )
scale = Vector2( 1, -1 )
texture = ExtResource( 4 )
offset = Vector2( 2430, 4 )
region_rect = Rect2( 2106.25, 268.196, 8.5918, 0 )

[connection signal="body_entered" from="FlyingLaserCutterBody/BackArea" to="." method="_on_BackArea_body_entered"]
[connection signal="body_exited" from="FlyingLaserCutterBody/BackArea" to="." method="_on_BackArea_body_exited"]
