74 lines
2.1 KiB
Plaintext
74 lines
2.1 KiB
Plaintext
|
[gd_scene load_steps=9 format=3 uid="uid://g7p0pn145hpe"]
|
||
|
|
||
|
[ext_resource type="Texture2D" uid="uid://b35me3ux1dl8t" path="res://graphics/enemies/slime_purple.png" id="1_1ntag"]
|
||
|
[ext_resource type="Script" path="res://scripts/badguy.gd" id="1_v13iu"]
|
||
|
|
||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_myg18"]
|
||
|
atlas = ExtResource("1_1ntag")
|
||
|
region = Rect2(0, 24, 24, 24)
|
||
|
|
||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_n2rjj"]
|
||
|
atlas = ExtResource("1_1ntag")
|
||
|
region = Rect2(24, 24, 24, 24)
|
||
|
|
||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_u7k88"]
|
||
|
atlas = ExtResource("1_1ntag")
|
||
|
region = Rect2(48, 24, 24, 24)
|
||
|
|
||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_nomh7"]
|
||
|
atlas = ExtResource("1_1ntag")
|
||
|
region = Rect2(72, 24, 24, 24)
|
||
|
|
||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_yk6ef"]
|
||
|
animations = [{
|
||
|
"frames": [{
|
||
|
"duration": 1.0,
|
||
|
"texture": SubResource("AtlasTexture_myg18")
|
||
|
}, {
|
||
|
"duration": 1.0,
|
||
|
"texture": SubResource("AtlasTexture_n2rjj")
|
||
|
}, {
|
||
|
"duration": 1.0,
|
||
|
"texture": SubResource("AtlasTexture_u7k88")
|
||
|
}, {
|
||
|
"duration": 1.0,
|
||
|
"texture": SubResource("AtlasTexture_nomh7")
|
||
|
}],
|
||
|
"loop": true,
|
||
|
"name": &"chase",
|
||
|
"speed": 12.0
|
||
|
}]
|
||
|
|
||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1c86m"]
|
||
|
size = Vector2(15, 15)
|
||
|
|
||
|
[node name="Area2D" type="Area2D"]
|
||
|
script = ExtResource("1_v13iu")
|
||
|
|
||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||
|
texture_filter = 1
|
||
|
sprite_frames = SubResource("SpriteFrames_yk6ef")
|
||
|
animation = &"chase"
|
||
|
autoplay = "chase"
|
||
|
frame_progress = 0.641285
|
||
|
|
||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||
|
position = Vector2(-0.5, 4.5)
|
||
|
shape = SubResource("RectangleShape2D_1c86m")
|
||
|
|
||
|
[node name="RightCast" type="RayCast2D" parent="."]
|
||
|
target_position = Vector2(12, 0)
|
||
|
|
||
|
[node name="LeftCast" type="RayCast2D" parent="."]
|
||
|
target_position = Vector2(-13, 0)
|
||
|
|
||
|
[node name="rightFloorCast" type="RayCast2D" parent="."]
|
||
|
position = Vector2(8, 0)
|
||
|
target_position = Vector2(0, 15)
|
||
|
|
||
|
[node name="leftFloorCast" type="RayCast2D" parent="."]
|
||
|
position = Vector2(-9, 0)
|
||
|
target_position = Vector2(0, 15)
|
||
|
|
||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|