[gd_scene load_steps=7 format=1]

[ext_resource path="res://Scenes/Events/milk_ray.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Events/milk_splash.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/Events/ray_milk_end.tres.gd" type="Script" id=3]
[ext_resource path="res://Sprites/Effects/milk_ray.png" type="Texture" id=4]
[ext_resource path="res://Sound/milk_ray_sound.ogg" type="AudioStream" id=5]

[sub_resource type="RectangleShape2D" id=1]

custom_solver_bias = 0.0
extents = Vector2( 32, 32 )

[node name="ray" type="RayCast2D"]

enabled = true
cast_to = Vector2( 10000, 0 )
layer_mask = 63
type_mask = 11
script/script = ExtResource( 1 )
damage = 120

[node name="end" parent="." instance=ExtResource( 2 )]

transform/pos = Vector2( 0, -1 )
transform/scale = Vector2( 0.5, 0.5 )
z/z = 1
z/relative = false
config/amount = 16
config/lifetime = 0.25
config/emit_timeout = 0.0
params/initial_size = 2.2

[node name="Area2D" type="Area2D" parent="end"]

input/pickable = false
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
priority = 100.0
monitorable = false
script/script = ExtResource( 3 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="end/Area2D"]

shape = SubResource( 1 )
trigger = false
_update_shape_index = 0

[node name="origin" parent="." instance=ExtResource( 2 )]

transform/pos = Vector2( 0, -1 )
transform/scale = Vector2( 0.5, 0.5 )
z/z = 1
z/relative = false
config/amount = 16
config/lifetime = 0.25
config/emit_timeout = 0.0
config/local_space = true
params/direction = 93.33
params/spread = 78.54
params/linear_velocity = 450.0
params/initial_size = 2.6

[node name="middle" type="Sprite" parent="."]

transform/pos = Vector2( 0, 6 )
texture = ExtResource( 4 )
centered = false
offset = Vector2( 0, -14.5 )
region = true
region_rect = Rect2( -1, 0, 0, 29 )

[node name="sound" type="StreamPlayer" parent="."]

stream/stream = ExtResource( 5 )
stream/play = false
stream/loop = true
stream/volume_db = 10.0
stream/autoplay = false
stream/paused = false
stream/loop_restart_time = 0.0
stream/buffering_ms = 500

[connection signal="body_enter" from="end/Area2D" to="end/Area2D" method="_on_Area2D_body_enter"]

[connection signal="body_exit" from="end/Area2D" to="end/Area2D" method="_on_Area2D_body_exit"]


