[gd_scene load_steps=16 format=3 uid="uid://cf2g2urxaukxb"] [ext_resource type="Script" path="res://scene/test/self_character.gd" id="1_d0trv"] [ext_resource type="Script" path="res://scene/test/state_machine.gd" id="2_v5m4x"] [ext_resource type="Script" path="res://scene/test/idle.gd" id="3_gcdcj"] [ext_resource type="Script" path="res://scene/test/run.gd" id="4_c7f2w"] [ext_resource type="Texture2D" uid="uid://csk8u15wepd1w" path="res://icon.svg" id="5_lkgch"] [ext_resource type="Script" path="res://scene/test/atk.gd" id="5_ol236"] [sub_resource type="CircleShape2D" id="CircleShape2D_740ny"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7uxj5"] size = Vector2(100, 108) [sub_resource type="Animation" id="Animation_tov45"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("action_show:visible") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } [sub_resource type="Animation" id="Animation_8eva7"] resource_name = "show" length = 0.5 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("action_show:visible") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.1, 0.5), "transitions": PackedFloat32Array(1, 1, 1), "update": 1, "values": [false, true, false] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_a6wya"] _data = { "RESET": SubResource("Animation_tov45"), "show": SubResource("Animation_8eva7") } [sub_resource type="Gradient" id="Gradient_k76nm"] colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_akajp"] gradient = SubResource("Gradient_k76nm") [sub_resource type="Gradient" id="Gradient_vdy2i"] colors = PackedColorArray(0, 1, 0, 1, 0, 1, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_jp0r7"] gradient = SubResource("Gradient_vdy2i") [node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("agent", "state_machine", "rotate", "attack_area")] script = ExtResource("1_d0trv") agent = NodePath("agent") state_machine = NodePath("state_machine") rotate = NodePath("rotate") attack_area = NodePath("rotate/attack_area") [node name="agent" type="NavigationAgent2D" parent="."] path_postprocessing = 1 avoidance_enabled = true radius = 20.0 debug_enabled = true [node name="Camera2D" type="Camera2D" parent="."] position_smoothing_enabled = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_740ny") [node name="state_machine" type="Node" parent="."] script = ExtResource("2_v5m4x") init_state = NodePath("idle") owner_player = NodePath("..") [node name="idle" type="Node" parent="state_machine"] script = ExtResource("3_gcdcj") [node name="run" type="Node" parent="state_machine"] script = ExtResource("4_c7f2w") [node name="atk" type="Node" parent="state_machine"] script = ExtResource("5_ol236") [node name="rotate" type="Node2D" parent="."] [node name="attack_area" type="Area2D" parent="rotate"] [node name="CollisionShape2D" type="CollisionShape2D" parent="rotate/attack_area"] position = Vector2(50, 1) shape = SubResource("RectangleShape2D_7uxj5") [node name="Sprite2D" type="Sprite2D" parent="."] visible = false texture = ExtResource("5_lkgch") [node name="action_show" type="Label" parent="."] unique_name_in_owner = true visible = false z_index = 1 offset_left = -40.0 offset_top = -75.0 offset_right = 39.0 offset_bottom = -6.0 theme_override_font_sizes/font_size = 50 text = "🤬" horizontal_alignment = 1 vertical_alignment = 1 [node name="action_animation" type="AnimationPlayer" parent="."] unique_name_in_owner = true libraries = { "": SubResource("AnimationLibrary_a6wya") } [node name="hp" type="TextureProgressBar" parent="."] unique_name_in_owner = true modulate = Color(1, 1, 1, 0.580392) offset_left = -127.0 offset_top = -260.0 offset_right = 129.0 offset_bottom = -220.0 nine_patch_stretch = true texture_under = SubResource("GradientTexture1D_akajp") texture_progress = SubResource("GradientTexture1D_jp0r7") [connection signal="state_value_changed" from="." to="." method="_on_state_value_changed"]