GodotGame/scenes/badguy.tscn
2024-08-12 21:01:40 -04:00

74 lines
2.1 KiB
Plaintext

[gd_scene load_steps=9 format=3 uid="uid://oja81cvx8jvu"]
[ext_resource type="Script" path="res://scripts/badguy.gd" id="1_du8nq"]
[ext_resource type="Texture2D" uid="uid://qwx0hufw5cxp" path="res://graphics/slime_purple.png" id="1_gpjbh"]
[sub_resource type="AtlasTexture" id="AtlasTexture_lrl51"]
atlas = ExtResource("1_gpjbh")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_4jdgy"]
atlas = ExtResource("1_gpjbh")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_7qvua"]
atlas = ExtResource("1_gpjbh")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_lc61m"]
atlas = ExtResource("1_gpjbh")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_t8k3l"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_lrl51")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4jdgy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7qvua")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lc61m")
}],
"loop": true,
"name": &"chase",
"speed": 12.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nrtm8"]
size = Vector2(14, 15)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_du8nq")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_t8k3l")
animation = &"chase"
autoplay = "chase"
frame_progress = 0.364441
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 4.5)
shape = SubResource("RectangleShape2D_nrtm8")
[node name="RightCast" type="RayCast2D" parent="."]
target_position = Vector2(9, 0)
[node name="LeftCast" type="RayCast2D" parent="."]
target_position = Vector2(-9, 0)
[node name="RightFloorCast" type="RayCast2D" parent="."]
position = Vector2(8, 10)
target_position = Vector2(0, 4)
[node name="LeftFloorCast" type="RayCast2D" parent="."]
position = Vector2(-8, 10)
target_position = Vector2(0, 4)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]