Aprilgame/Scenes/slime.tscn
2026-05-25 21:03:44 -04:00

76 lines
2.3 KiB
Plaintext

[gd_scene format=3 uid="uid://dkp7dy7npof2g"]
[ext_resource type="Texture2D" uid="uid://cvdfmap7kwo02" path="res://assets/graphics/Enemies/slime_green.png" id="1_jokqx"]
[ext_resource type="Script" uid="uid://ca13ras6c8xw3" path="res://Scripts/slime.gd" id="1_swwnm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_swwnm"]
atlas = ExtResource("1_jokqx")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_aiwxb"]
atlas = ExtResource("1_jokqx")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_paq7w"]
atlas = ExtResource("1_jokqx")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_f4si1"]
atlas = ExtResource("1_jokqx")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_5gljc"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_swwnm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aiwxb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_paq7w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f4si1")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vblni"]
size = Vector2(18, 17)
[node name="Slime" type="Area2D" unique_id=1791005633]
script = ExtResource("1_swwnm")
[node name="SlimeGraphic" type="AnimatedSprite2D" parent="." unique_id=285767010]
texture_filter = 1
position = Vector2(0, -2)
sprite_frames = SubResource("SpriteFrames_5gljc")
animation = &"idle"
autoplay = "idle"
frame = 3
frame_progress = 0.89758253
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1963753671]
position = Vector2(0, 1.5)
shape = SubResource("RectangleShape2D_vblni")
[node name="Rightcast" type="RayCast2D" parent="." unique_id=1783847293]
target_position = Vector2(12, 0)
[node name="LeftCast" type="RayCast2D" parent="." unique_id=500912486]
target_position = Vector2(-12, 0)
[node name="LeftDownCast" type="RayCast2D" parent="." unique_id=586259475]
position = Vector2(-7, 0)
target_position = Vector2(0, 14)
[node name="RightDownCast" type="RayCast2D" parent="." unique_id=54037895]
position = Vector2(7, 0)
target_position = Vector2(0, 14)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]