JeremyGodot/scenes/badguy.tscn

74 lines
2.1 KiB
Plaintext

[gd_scene load_steps=9 format=3 uid="uid://dvied5dxkc7e0"]
[ext_resource type="Script" path="res://scripts/badguy.gd" id="1_7u81x"]
[ext_resource type="Texture2D" uid="uid://bw43f1enjixbk" path="res://graphics/enemies/slime_purple.png" id="1_anh2u"]
[sub_resource type="AtlasTexture" id="AtlasTexture_o20x5"]
atlas = ExtResource("1_anh2u")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_o8v3c"]
atlas = ExtResource("1_anh2u")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_tsden"]
atlas = ExtResource("1_anh2u")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_o7cwn"]
atlas = ExtResource("1_anh2u")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_uh2us"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_o20x5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o8v3c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tsden")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o7cwn")
}],
"loop": true,
"name": &"chase",
"speed": 12.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vdsen"]
size = Vector2(14, 15)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_7u81x")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_uh2us")
animation = &"chase"
autoplay = "chase"
frame_progress = 0.56706
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 4.5)
shape = SubResource("RectangleShape2D_vdsen")
[node name="RightCast" type="RayCast2D" parent="."]
target_position = Vector2(13, 0)
[node name="LeftCast" type="RayCast2D" parent="."]
target_position = Vector2(-13, 0)
[node name="rightFloorCast" type="RayCast2D" parent="."]
position = Vector2(7, 0)
target_position = Vector2(0, 15)
[node name="leftFloorCast" type="RayCast2D" parent="."]
position = Vector2(-7, 0)
target_position = Vector2(0, 15)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]