[gd_scene load_steps=15 format=3 uid="uid://6mtip3ruyn"] [ext_resource type="Texture2D" uid="uid://coj0d33vyyqx1" path="res://player/bullet.webp" id="1"] [ext_resource type="AudioStream" uid="uid://duwm7i44o75o2" path="res://enemy/explode.wav" id="2"] [ext_resource type="AudioStream" uid="uid://dm7wsawmylc7b" path="res://enemy/hit.wav" id="3"] [ext_resource type="Texture2D" uid="uid://bjjywmvba0sve" path="res://enemy/enemy.webp" id="4"] [ext_resource type="Script" path="res://enemy/enemy.gd" id="5"] [sub_resource type="CanvasItemMaterial" id="1"] [sub_resource type="Animation" id="8"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Explosion:scale_amount") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, "values": [4.0] } tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true tracks/1/path = NodePath("Sprite2D:frame") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, "values": [0] } tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true tracks/2/path = NodePath("Explosion:scale_amount_max") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, "values": [1.0] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true tracks/3/path = NodePath(".:collision_layer") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [2] } [sub_resource type="Animation" id="2"] resource_name = "destroy" length = 1.5 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, "values": [7] } tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true tracks/1/path = NodePath("Sprite2D:rotation_degrees") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0, 0.8), "transitions": PackedFloat32Array(0.0796601, 1), "update": 0, "values": [0.0, 180.0] } tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true tracks/2/path = NodePath("Sprite2D:self_modulate") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "times": PackedFloat32Array(0, 0.5, 1.1), "transitions": PackedFloat32Array(1, 1, 1), "update": 0, "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)] } tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true tracks/3/path = NodePath("Explosion:emitting") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { "times": PackedFloat32Array(0, 0.6), "transitions": PackedFloat32Array(1, 1), "update": 1, "values": [false, true] } tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true tracks/4/path = NodePath("Hit:playing") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { "times": PackedFloat32Array(0.00999999), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/5/type = "value" tracks/5/imported = false tracks/5/enabled = true tracks/5/path = NodePath("Explode:playing") tracks/5/interp = 1 tracks/5/loop_wrap = true tracks/5/keys = { "times": PackedFloat32Array(0.6), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } 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.5), "transitions": PackedFloat32Array(1), "values": [{ "args": [], "method": &"queue_free" }] } tracks/7/type = "value" tracks/7/imported = false tracks/7/enabled = true tracks/7/path = NodePath(".:collision_layer") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [0] } tracks/8/type = "value" tracks/8/imported = false tracks/8/enabled = true tracks/8/path = NodePath("Sprite2D:position") tracks/8/interp = 1 tracks/8/loop_wrap = true tracks/8/keys = { "times": PackedFloat32Array(0, 0.2, 0.4), "transitions": PackedFloat32Array(2.2974, 0.183011, 1), "update": 0, "values": [Vector2(0, 0), Vector2(0, -32), Vector2(0, 0)] } tracks/9/type = "value" tracks/9/imported = false tracks/9/enabled = true tracks/9/path = NodePath("Explosion:scale_amount_min") tracks/9/interp = 1 tracks/9/loop_wrap = true tracks/9/keys = { "times": PackedFloat32Array(0.6, 1), "transitions": PackedFloat32Array(1, 1), "update": 0, "values": [1.0, 4.0] } tracks/10/type = "value" tracks/10/imported = false tracks/10/enabled = true tracks/10/path = NodePath("Explosion:scale_amount_max") tracks/10/interp = 1 tracks/10/loop_wrap = true tracks/10/keys = { "times": PackedFloat32Array(0.6, 1), "transitions": PackedFloat32Array(1, 1), "update": 0, "values": [1.0, 4.0] } [sub_resource type="Animation" id="3"] length = 3.0 loop_mode = 1 step = 0.25 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.333, 0.666, 0.999, 1.332, 1.665, 1.998, 2.331, 2.664, 2.997), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 1, "values": [5, 6, 5, 6, 5, 6, 7, 6, 7, 5] } [sub_resource type="Animation" id="4"] loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.062475, 0.12495, 0.187425, 0.2499, 0.312375, 0.37485, 0.437325, 0.4998, 0.562275, 0.62475, 0.687225, 0.7497, 0.812175, 0.87465, 0.937125), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 1, "values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_0kjfc"] _data = { "RESET": SubResource("8"), "destroy": SubResource("2"), "idle": SubResource("3"), "walk": SubResource("4") } [sub_resource type="CapsuleShape2D" id="5"] radius = 18.0 height = 50.0 [sub_resource type="CanvasItemMaterial" id="6"] blend_mode = 1 [sub_resource type="Gradient" id="7"] offsets = PackedFloat32Array(0.5, 1) colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1) [node name="Enemy" type="CharacterBody2D"] collision_layer = 2 collision_mask = 24 script = ExtResource("5") [node name="PlatformDetector" type="RayCast2D" parent="."] position = Vector2(0, 6) target_position = Vector2(0, 8) collision_mask = 8 [node name="FloorDetectorLeft" type="RayCast2D" parent="."] position = Vector2(-15, -4) target_position = Vector2(0, 35) collision_mask = 24 [node name="FloorDetectorRight" type="RayCast2D" parent="."] position = Vector2(15.5, -3) target_position = Vector2(0, 35) collision_mask = 24 [node name="Sprite2D" type="Sprite2D" parent="."] material = SubResource("1") scale = Vector2(0.8, 0.8) texture = ExtResource("4") flip_h = true hframes = 8 vframes = 2 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { "": SubResource("AnimationLibrary_0kjfc") } [node name="CollisionShape2D" type="CollisionShape2D" parent="."] rotation = -1.5708 shape = SubResource("5") [node name="Explosion" type="CPUParticles2D" parent="."] self_modulate = Color(1, 1, 1, 0.12) material = SubResource("6") emitting = false amount = 32 lifetime = 0.5 one_shot = true speed_scale = 1.2 explosiveness = 0.7 draw_order = 215832976 texture = ExtResource("1") emission_shape = 1 emission_sphere_radius = 16.0 spread = 180.0 gravity = Vector2(0, -250) color_ramp = SubResource("7") [node name="Hit" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("3") [node name="Explode" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("2")