46 lines
1.2 KiB
Text
46 lines
1.2 KiB
Text
[gd_scene load_steps=6 format=2]
|
|
|
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=1]
|
|
[ext_resource path="res://Spider.gd" type="Script" id=2]
|
|
|
|
[sub_resource type="CircleShape2D" id=1]
|
|
radius = 7.80859
|
|
|
|
[sub_resource type="CircleShape2D" id=2]
|
|
radius = 184.082
|
|
|
|
[sub_resource type="CircleShape2D" id=3]
|
|
radius = 20.4363
|
|
|
|
[node name="Spider" type="KinematicBody2D" groups=[
|
|
"enemy",
|
|
]]
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="Graphics" type="Sprite" parent="."]
|
|
texture = ExtResource( 1 )
|
|
region_enabled = true
|
|
region_rect = Rect2( 0, 48, 16, 16 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource( 1 )
|
|
|
|
[node name="StunTimer" type="Timer" parent="."]
|
|
wait_time = 0.5
|
|
one_shot = true
|
|
|
|
[node name="AggroArea" type="Area2D" parent="."]
|
|
|
|
[node name="AggroRadius" type="CollisionShape2D" parent="AggroArea"]
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="Look" type="RayCast2D" parent="."]
|
|
enabled = true
|
|
|
|
[node name="AttackArea" type="Area2D" parent="."]
|
|
|
|
[node name="AttackRadius" type="CollisionShape2D" parent="AttackArea"]
|
|
shape = SubResource( 3 )
|
|
|
|
[connection signal="timeout" from="StunTimer" to="." method="_on_StunTimer_timeout"]
|
|
[connection signal="body_entered" from="AggroArea" to="." method="_on_AggroArea_body_entered"]
|