[gd_scene load_steps=20 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://jnqii6cg0cy" path="res://scenes/hit_box.tscn" id="4_pjw23"] [ext_resource type="AudioStream" uid="uid://bhayvfhydadqy" path="res://assets/sounds/tap.wav" id="5_2npkn"] [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="AtlasTexture" id="AtlasTexture_v5wyi"] atlas = ExtResource("1_p2gj0") region = Rect2(72, 0, 24, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_0l8pv"] atlas = ExtResource("1_p2gj0") region = Rect2(48, 0, 24, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_vnioy"] atlas = ExtResource("1_p2gj0") region = Rect2(24, 0, 24, 24) [sub_resource type="AtlasTexture" id="AtlasTexture_2xjuo"] atlas = ExtResource("1_p2gj0") region = Rect2(0, 0, 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 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_v5wyi") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_0l8pv") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_vnioy") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_2xjuo") }], "loop": true, "name": &"die", "speed": 10.0 }] [sub_resource type="RectangleShape2D" id="RectangleShape2D_pjw23"] size = Vector2(10, 2) [sub_resource type="Animation" id="Animation_pjw23"] resource_name = "die" tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("CollisionShape2D:disabled") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true tracks/1/path = NodePath("Sounds/Death:playing") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true tracks/2/path = NodePath("RayCastRight:enabled") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true tracks/3/path = NodePath("RayCastLeft:enabled") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true tracks/4/path = NodePath("Killzone/CollisionPolygon2D:disabled") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/5/type = "bezier" tracks/5/imported = false tracks/5/enabled = true tracks/5/path = NodePath("AnimatedSprite2D:rotation") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { "handle_modes": PackedInt32Array(0, 0), "points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 1.134464, -0.083333336, -0.18907735, 0, 0), "times": PackedFloat32Array(0, 0.26666668) } tracks/6/type = "method" tracks/6/imported = false tracks/6/enabled = true tracks/6/path = NodePath(".") tracks/6/interp = 1 tracks/6/loop_wrap = true tracks/6/keys = { "times": PackedFloat32Array(1), "transitions": PackedFloat32Array(1), "values": [{ "args": [], "method": &"queue_free" }] } [sub_resource type="Animation" id="Animation_2npkn"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("CollisionShape2D:disabled") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true tracks/1/path = NodePath("Sounds/Death:playing") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true tracks/2/path = NodePath("RayCastRight:enabled") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true tracks/3/path = NodePath("RayCastLeft:enabled") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true tracks/4/path = NodePath("Killzone/CollisionPolygon2D:disabled") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } tracks/5/type = "bezier" tracks/5/imported = false tracks/5/enabled = true tracks/5/path = NodePath("AnimatedSprite2D:rotation") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { "handle_modes": PackedInt32Array(0), "points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), "times": PackedFloat32Array(0) } [sub_resource type="AnimationLibrary" id="AnimationLibrary_2npkn"] _data = { &"RESET": SubResource("Animation_2npkn"), &"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, -8.755) sprite_frames = SubResource("SpriteFrames_v5wyi") animation = &"die" autoplay = "default" offset = Vector2(0, -3.285) [node name="HitBox" parent="." instance=ExtResource("4_pjw23")] collision_mask = 2 player_bounce = -200 [node name="CollisionShape2D" type="CollisionShape2D" parent="HitBox"] position = Vector2(0, -12) shape = SubResource("RectangleShape2D_pjw23") [node name="Killzone" parent="." instance=ExtResource("2_n6pvg")] [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Killzone"] polygon = PackedVector2Array(-7, 0, 7, 0, 7, -4, 5, -8, -5, -8, -7, -4) [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") } [node name="Sounds" type="Node" parent="."] [node name="Death" type="AudioStreamPlayer2D" parent="Sounds"] stream = ExtResource("5_2npkn") bus = &"SFX" [connection signal="hit" from="HitBox" to="." method="_on_hit_box_hit"]