Basic Bat enemy AI
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=14 format=2]
|
||||
[gd_scene load_steps=16 format=2]
|
||||
|
||||
[ext_resource path="res://Enemies/Bat.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Shadows/SmallShadow.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Overlap/Hurtbox.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Enemies/Bat.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Stats.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://Enemies/PlayerDetectionZone.tscn" type="PackedScene" id=6]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
@@ -41,6 +42,9 @@ radius = 4.12311
|
||||
radius = 7.0
|
||||
height = 6.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id=9]
|
||||
radius = 61.0328
|
||||
|
||||
[node name="Bat" type="KinematicBody2D"]
|
||||
collision_layer = 16
|
||||
script = ExtResource( 4 )
|
||||
@@ -48,7 +52,7 @@ script = ExtResource( 4 )
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 6 )
|
||||
animation = "Fly"
|
||||
frame = 4
|
||||
frame = 1
|
||||
playing = true
|
||||
offset = Vector2( 0, -12 )
|
||||
|
||||
@@ -68,7 +72,14 @@ shape = SubResource( 8 )
|
||||
[node name="Stats" parent="." instance=ExtResource( 5 )]
|
||||
max_health = 2
|
||||
|
||||
[node name="PlayerDetectionZone" parent="." instance=ExtResource( 6 )]
|
||||
|
||||
[node name="CollisionShape2D" parent="PlayerDetectionZone" index="0"]
|
||||
modulate = Color( 1, 1, 1, 0.258824 )
|
||||
shape = SubResource( 9 )
|
||||
|
||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
[connection signal="no_health" from="Stats" to="." method="_on_Stats_no_health"]
|
||||
|
||||
[editable path="Hurtbox"]
|
||||
[editable path="PlayerDetectionZone"]
|
||||
|
||||
Reference in New Issue
Block a user