[gd_scene load_steps=8 format=2]

[ext_resource path="res://sprites/objects/sentry/normalsentry.png" type="Texture" id=1]
[ext_resource path="res://objects/sentry/Sentry.gd" type="Script" id=2]

[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 20, 20 )

[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 20, 0, 20, 20 )

[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
"loop": true,
"name": "blinking",
"speed": 0.75
} ]

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

[sub_resource type="CircleShape2D" id=5]
radius = 1.0

[node name="Sentry" type="AnimatedSprite"]
frames = SubResource( 3 )
animation = "blinking"
playing = true
script = ExtResource( 2 )

[node name="Area2D" type="Area2D" parent="." groups=[
"sentry",
]]

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

[node name="Range" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="Range"]
shape = SubResource( 5 )

[node name="SpeedUpTimer" type="Timer" parent="."]
one_shot = true
autostart = true
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
[connection signal="body_entered" from="Range" to="." method="aggro"]
[connection signal="timeout" from="SpeedUpTimer" to="." method="_on_SpeedUpTimer_timeout"]
