[gd_scene load_steps=7 format=2]

[ext_resource path="res://assets/enemy/VacuumRobot.png" type="Texture" id=1]
[ext_resource path="res://src/Actors/Enemies/Vacuum.gd" type="Script" id=2]
[ext_resource path="res://src/StateMachines/VacuumStateMachine.gd" type="Script" id=3]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 14, 7 )

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 14, 1.5 )

[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 15, 6.5 )

[node name="Vacuum" type="KinematicBody2D" groups=["harmful"]]
collision_layer = 2
collision_mask = 11
script = ExtResource( 2 )
mass = 1.0
speed = 180
acceleration = 100

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -3 )
texture = ExtResource( 1 )
hframes = 2

[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
position = Vector2( 1362.81, 3.85601 )
scale = Vector2( 15.4865, 0.885601 )
rect = Rect2( -89, -10, 2, 20 )
process_parent = true
physics_process_parent = true

[node name="EnemyBody" type="CollisionShape2D" parent="."]
position = Vector2( -4.76837e-07, 6 )
shape = SubResource( 1 )

[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
modulate = Color( 0, 0.0392157, 1, 1 )
collision_layer = 2
input_pickable = false

[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"]
position = Vector2( 0, -3.55905 )
shape = SubResource( 2 )

[node name="LedgeDetectorRays" type="Node2D" parent="."]
position = Vector2( -14, 12 )

[node name="RayCast2D" type="RayCast2D" parent="LedgeDetectorRays"]
position = Vector2( 1, 0 )
rotation = 1.5708
enabled = true
cast_to = Vector2( 0, 1000 )
collision_mask = 121

[node name="RayCast2D2" type="RayCast2D" parent="LedgeDetectorRays"]
position = Vector2( 27, 0 )
rotation = -1.5708
enabled = true
cast_to = Vector2( 0, 1000 )
collision_mask = 121

[node name="EnemySkin" type="Area2D" parent="." groups=["player"]]
process_priority = -1
collision_layer = 2
collision_mask = 127

[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
position = Vector2( 0, 5.5 )
shape = SubResource( 3 )

[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 3 )

[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
[connection signal="area_entered" from="EnemySkin" to="." method="_on_EnemySkin_area_entered"]
[connection signal="body_entered" from="EnemySkin" to="." method="_on_EnemySkin_body_entered"]
