102 lines
3.1 KiB
Plaintext
102 lines
3.1 KiB
Plaintext
[gd_scene load_steps=15 format=3 uid="uid://bvw0afyajdmht"]
|
|
|
|
[ext_resource type="Script" uid="uid://cxpc8xcf3r6rg" path="res://scripts/slime.gd" id="1_n6pvg"]
|
|
[ext_resource type="Texture2D" uid="uid://do7enjpf3pftb" path="res://assets/sprites/slime_green.png" id="1_p2gj0"]
|
|
[ext_resource type="PackedScene" uid="uid://dpox5fa2pojpo" path="res://scenes/killzone.tscn" id="2_n6pvg"]
|
|
[ext_resource type="PackedScene" uid="uid://bmv6eq8rt7fsb" path="res://scenes/hit_box.tscn" id="4_pjw23"]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_pjw23"]
|
|
radius = 5.0
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
|
|
atlas = ExtResource("1_p2gj0")
|
|
region = Rect2(0, 24, 24, 24)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
|
|
atlas = ExtResource("1_p2gj0")
|
|
region = Rect2(24, 24, 24, 24)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fd6lc"]
|
|
atlas = ExtResource("1_p2gj0")
|
|
region = Rect2(48, 24, 24, 24)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gstla"]
|
|
atlas = ExtResource("1_p2gj0")
|
|
region = Rect2(72, 24, 24, 24)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_v5wyi"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_pjw23")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_2npkn")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_fd6lc")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_gstla")
|
|
}],
|
|
"loop": true,
|
|
"name": &"default",
|
|
"speed": 7.0
|
|
}]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0l8pv"]
|
|
size = Vector2(10, 9)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2npkn"]
|
|
size = Vector2(8, 3)
|
|
|
|
[sub_resource type="Animation" id="Animation_pjw23"]
|
|
resource_name = "die"
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_2npkn"]
|
|
_data = {
|
|
&"die": SubResource("Animation_pjw23")
|
|
}
|
|
|
|
[node name="Slime" type="CharacterBody2D"]
|
|
floor_stop_on_slope = false
|
|
floor_snap_length = 5.0
|
|
script = ExtResource("1_n6pvg")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(0, -6)
|
|
shape = SubResource("CircleShape2D_pjw23")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
position = Vector2(0, -12)
|
|
sprite_frames = SubResource("SpriteFrames_v5wyi")
|
|
autoplay = "default"
|
|
frame_progress = 0.45857617
|
|
|
|
[node name="Killzone" parent="." instance=ExtResource("2_n6pvg")]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Killzone"]
|
|
position = Vector2(0, -4.5)
|
|
shape = SubResource("RectangleShape2D_0l8pv")
|
|
|
|
[node name="HitBox" parent="." instance=ExtResource("4_pjw23")]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBox"]
|
|
position = Vector2(0, -11.5)
|
|
shape = SubResource("RectangleShape2D_2npkn")
|
|
|
|
[node name="RayCastRight" type="RayCast2D" parent="."]
|
|
position = Vector2(0, -6)
|
|
target_position = Vector2(8, 0)
|
|
|
|
[node name="RayCastLeft" type="RayCast2D" parent="."]
|
|
position = Vector2(0, -6)
|
|
target_position = Vector2(-9, 0)
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
&"": SubResource("AnimationLibrary_2npkn")
|
|
}
|
|
|
|
[connection signal="killed" from="HitBox" to="." method="_on_hit_box_killed"]
|