June2026Game/scenes/slime.tscn

72 lines
2.2 KiB
Plaintext

[gd_scene format=3 uid="uid://b23q2ppkeamyh"]
[ext_resource type="Texture2D" uid="uid://bj3ccpqo3t7pv" path="res://assets/enemies/slime/slime_green.png" id="1_371uh"]
[ext_resource type="Script" uid="uid://d215jspbbgtq6" path="res://scripts/slime.gd" id="1_p2gj0"]
[sub_resource type="AtlasTexture" id="AtlasTexture_p2gj0"]
atlas = ExtResource("1_371uh")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_n6pvg"]
atlas = ExtResource("1_371uh")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
atlas = ExtResource("1_371uh")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
atlas = ExtResource("1_371uh")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_fd6lc"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_p2gj0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_n6pvg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pjw23")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2npkn")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_gstla"]
[node name="Slime" type="Area2D" unique_id=822623820 groups=["shootable"]]
script = ExtResource("1_p2gj0")
[node name="SlimeGraphic" type="AnimatedSprite2D" parent="." unique_id=610452905]
texture_filter = 1
position = Vector2(0, -1)
sprite_frames = SubResource("SpriteFrames_fd6lc")
animation = &"idle"
autoplay = "idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1641996317]
shape = SubResource("CircleShape2D_gstla")
[node name="RightCast" type="RayCast2D" parent="." unique_id=460628221]
target_position = Vector2(16, 0)
[node name="RightDownCast" type="RayCast2D" parent="." unique_id=1352799730]
position = Vector2(9, 0)
target_position = Vector2(1, 14)
[node name="LeftDownCast" type="RayCast2D" parent="." unique_id=1378900976]
position = Vector2(-9, 0)
target_position = Vector2(1, 14)
[node name="LeftCast" type="RayCast2D" parent="." unique_id=1023073791]
target_position = Vector2(-16, 0)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]