From f85555675b73d2b6f171bc4645545ca3ea41e701 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 31 Jan 2024 17:27:35 +0100 Subject: [PATCH] Demo: Combo attack, better particles and animation tweaks --- demo/demo/agents/agent_base.tscn | 1595 +++++++++-------- demo/demo/agents/agent_base_enemy.tscn | 4 +- demo/demo/agents/player/player.gd | 3 +- demo/demo/agents/player/player.tscn | 2 +- .../demo/agents/player/states/attack_state.gd | 24 +- demo/demo/agents/player/states/idle_state.gd | 2 +- demo/demo/agents/player/states/move_state.gd | 5 +- demo/demo/agents/scripts/agent_base.gd | 1 - demo/demo/agents/scripts/health.gd | 5 +- demo/demo/agents/scripts/hitbox.gd | 12 +- demo/demo/agents/scripts/hurtbox.gd | 7 +- demo/demo/ai/tasks/pursue.gd | 6 + demo/demo/ai/trees/enemy_melee_simple.tres | 12 +- demo/demo/scenes/demo.tscn | 6 +- demo/export_presets.cfg | 37 + demo/project.godot | 3 + 16 files changed, 907 insertions(+), 817 deletions(-) create mode 100644 demo/export_presets.cfg diff --git a/demo/demo/agents/agent_base.tscn b/demo/demo/agents/agent_base.tscn index 7c5a7b1..a14eb2e 100644 --- a/demo/demo/agents/agent_base.tscn +++ b/demo/demo/agents/agent_base.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=29 format=3 uid="uid://ooigbfhfy4wa"] +[gd_scene load_steps=27 format=3 uid="uid://ooigbfhfy4wa"] [ext_resource type="Texture2D" uid="uid://dlo1ine6p5di4" path="res://demo/assets/agent_bobby.png" id="1_1u51b"] [ext_resource type="Script" path="res://demo/agents/scripts/agent_base.gd" id="1_n8vy2"] @@ -8,36 +8,32 @@ [ext_resource type="Script" path="res://demo/agents/scripts/hitbox.gd" id="5_taq6b"] [ext_resource type="Script" path="res://demo/agents/scripts/hurtbox.gd" id="6_jnvxm"] -[sub_resource type="Curve" id="Curve_0elig"] -_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.484733, 0.825158), -0.48365, -0.48365, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] -point_count = 3 - -[sub_resource type="CurveTexture" id="CurveTexture_lbr6r"] -curve = SubResource("Curve_0elig") - [sub_resource type="Curve" id="Curve_noh01"] -_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.496183, 0.917722), 0.0, 0.0, 0, 0, Vector2(0.996183, 0.46519), 0.0, 0.0, 0, 0] +_data = [Vector2(0, 0.010989), 0.0, 0.0, 0, 0, Vector2(0.151111, 1), 1.3559, 1.3559, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] point_count = 3 [sub_resource type="CurveTexture" id="CurveTexture_1f5jp"] curve = SubResource("Curve_noh01") [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_f5i1x"] -lifetime_randomness = 0.28 +lifetime_randomness = 0.5 particle_flag_disable_z = true emission_shape = 3 emission_box_extents = Vector3(40, 1, 1) direction = Vector3(0, -1, 0) -spread = 30.0 -initial_velocity_min = 50.0 -initial_velocity_max = 400.0 +spread = 90.0 +initial_velocity_min = 150.0 +initial_velocity_max = 250.0 angular_velocity_min = -90.0 angular_velocity_max = 90.0 -gravity = Vector3(0, -98, 0) +gravity = Vector3(0, 0, 0) +radial_accel_min = -90.0 +radial_accel_max = 90.0 +damping_min = 200.0 +damping_max = 200.0 +scale_min = 0.8 scale_max = 1.2 scale_curve = SubResource("CurveTexture_1f5jp") -color = Color(0.817521, 0.817521, 0.817521, 1) -alpha_curve = SubResource("CurveTexture_lbr6r") [sub_resource type="RectangleShape2D" id="RectangleShape2D_2k81i"] size = Vector2(100, 35) @@ -351,251 +347,6 @@ tracks/24/keys = { "values": [false] } -[sub_resource type="Animation" id="Animation_g7a0r"] -resource_name = "attack" -length = 0.35 -step = 0.05 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Root/Rig/Body:position") -tracks/0/interp = 2 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(5, 53), Vector2(-5, 40), Vector2(-5, 40)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Root/Rig/Body:rotation") -tracks/1/interp = 2 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, -0.349066, 0.436332] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Root/Rig/Body:scale") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(0.9, 1.1), Vector2(1.1, 0.9)] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Root/Rig/Body/Hat:position") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(2, -91)] -} -tracks/4/type = "value" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("Root/Rig/Body/Hat:rotation") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0.0] -} -tracks/5/type = "value" -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/path = NodePath("Root/Rig/Body/Hat:scale") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(1, 1)] -} -tracks/6/type = "value" -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/path = NodePath("Root/Rig/Body/HandL:position") -tracks/6/interp = 2 -tracks/6/loop_wrap = true -tracks/6/keys = { -"times": PackedFloat32Array(0, 0.2, 0.25, 0.3), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(-60, -53), Vector2(-93.4894, -42.3521), Vector2(6.40698, 1.6281), Vector2(68.5276, -75.9627)] -} -tracks/7/type = "value" -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/path = NodePath("Root/Rig/Body/HandL:rotation") -tracks/7/interp = 2 -tracks/7/loop_wrap = true -tracks/7/keys = { -"times": PackedFloat32Array(0, 0.2, 0.25, 0.3), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 1.70101, 0.0, 0.0] -} -tracks/8/type = "value" -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/path = NodePath("Root/Rig/Body/HandL:scale") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(2, 2), Vector2(3, 3)] -} -tracks/9/type = "value" -tracks/9/imported = false -tracks/9/enabled = true -tracks/9/path = NodePath("Root/Rig/Body/HandR:position") -tracks/9/interp = 2 -tracks/9/loop_wrap = true -tracks/9/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(51, -51), Vector2(-1.40495, -52.6598), Vector2(-66.8689, -27.8787)] -} -tracks/10/type = "value" -tracks/10/imported = false -tracks/10/enabled = true -tracks/10/path = NodePath("Root/Rig/Body/HandR:rotation") -tracks/10/interp = 2 -tracks/10/loop_wrap = true -tracks/10/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0] -} -tracks/11/type = "value" -tracks/11/imported = false -tracks/11/enabled = true -tracks/11/path = NodePath("Root/Rig/Body/HandR:scale") -tracks/11/interp = 1 -tracks/11/loop_wrap = true -tracks/11/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/12/type = "value" -tracks/12/imported = false -tracks/12/enabled = true -tracks/12/path = NodePath("Root/Rig/LegL:position") -tracks/12/interp = 2 -tracks/12/loop_wrap = true -tracks/12/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(-29, 65), Vector2(-57, 59), Vector2(37, 63)] -} -tracks/13/type = "value" -tracks/13/imported = false -tracks/13/enabled = true -tracks/13/path = NodePath("Root/Rig/LegL:rotation") -tracks/13/interp = 2 -tracks/13/loop_wrap = true -tracks/13/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, 0.706805, -0.742333] -} -tracks/14/type = "value" -tracks/14/imported = false -tracks/14/enabled = true -tracks/14/path = NodePath("Root/Rig/LegL:scale") -tracks/14/interp = 1 -tracks/14/loop_wrap = true -tracks/14/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/15/type = "value" -tracks/15/imported = false -tracks/15/enabled = true -tracks/15/path = NodePath("Root/Rig/LegR:position") -tracks/15/interp = 2 -tracks/15/loop_wrap = true -tracks/15/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(31, 65), Vector2(31, 65), Vector2(-45, 39)] -} -tracks/16/type = "value" -tracks/16/imported = false -tracks/16/enabled = true -tracks/16/path = NodePath("Root/Rig/LegR:rotation") -tracks/16/interp = 2 -tracks/16/loop_wrap = true -tracks/16/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, -0.477383, 1.06217] -} -tracks/17/type = "value" -tracks/17/imported = false -tracks/17/enabled = true -tracks/17/path = NodePath("Root/Rig/LegR:scale") -tracks/17/interp = 1 -tracks/17/loop_wrap = true -tracks/17/keys = { -"times": PackedFloat32Array(0, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/18/type = "value" -tracks/18/imported = false -tracks/18/enabled = true -tracks/18/path = NodePath("Root/FX/Cloud:visible") -tracks/18/interp = 1 -tracks/18/loop_wrap = true -tracks/18/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] -} -tracks/19/type = "value" -tracks/19/imported = false -tracks/19/enabled = true -tracks/19/path = NodePath("Root/Hitbox/CollisionShape2D:disabled") -tracks/19/interp = 1 -tracks/19/loop_wrap = true -tracks/19/keys = { -"times": PackedFloat32Array(0, 0.15, 0.3), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 1, -"values": [true, false, true] -} - [sub_resource type="Animation" id="Animation_b0ub6"] resource_name = "attack_ranged" length = 0.3 @@ -1373,10 +1124,10 @@ tracks/20/path = NodePath("Root/Rig:modulate") tracks/20/interp = 1 tracks/20/loop_wrap = true tracks/20/keys = { -"times": PackedFloat32Array(0, 0.02, 0.05, 0.08, 0.1), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.11, 0.22), +"transitions": PackedFloat32Array(1, 1, 1), "update": 0, -"values": [Color(1, 1, 1, 1), Color(0.721569, 0, 0.0352941, 1), Color(1, 1, 1, 1), Color(0.721569, 0, 0.0352941, 1), Color(1, 1, 1, 1)] +"values": [Color(1, 1, 1, 1), Color(0.721569, 0, 0.0352941, 1), Color(1, 1, 1, 1)] } [sub_resource type="Animation" id="Animation_gnqgt"] @@ -1612,6 +1363,262 @@ tracks/18/keys = { "values": [false] } +[sub_resource type="Animation" id="Animation_msfb2"] +resource_name = "roll" +length = 0.4 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Root/Rig:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.4), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(0, -76), Vector2(0, -38), Vector2(0, -76)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Root/Rig:rotation") +tracks/1/interp = 2 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 2, +"values": [0.0, 2.35619, 6.28319, 12.5664] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Root/Rig:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 0.5), Vector2(1, 0.5), Vector2(1, 0.5), Vector2(1, 1)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Root/Rig/LegL:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(-29, 65), Vector2(-24.8287, 40.1066), Vector2(-24.8287, 40.1066), Vector2(-29, 65)] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Root/Rig/LegL:rotation") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0, 0.0] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Root/Rig/LegL:scale") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Root/Rig/LegR:position") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(31, 65), Vector2(26.1794, 41.8884), Vector2(26.1794, 41.8884), Vector2(31, 65)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Root/Rig/LegR:rotation") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0, 0.0] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Root/Rig/LegR:scale") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Root/Rig/Body:position") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(5, 53), Vector2(5, 53), Vector2(5, 53), Vector2(5, 53)] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Root/Rig/Body:rotation") +tracks/10/interp = 1 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0, 0.0] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Root/Rig/Body:scale") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Root/Rig/Body/Hat:position") +tracks/12/interp = 1 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(2, -91), Vector2(2, -91), Vector2(2, -91), Vector2(2, -91)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Root/Rig/Body/Hat:rotation") +tracks/13/interp = 1 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0, 0.0] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Root/Rig/Body/Hat:scale") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Root/Rig/Body/HandL:position") +tracks/15/interp = 1 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(-60, -53), Vector2(-19.9999, -52.9358), Vector2(-19.9999, -52.9358), Vector2(-60, -53)] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Root/Rig/Body/HandL:rotation") +tracks/16/interp = 1 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0, 0.0] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Root/Rig/Body/HandL:scale") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Root/Rig/Body/HandR:position") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(51, -51), Vector2(21.9955, -54.1155), Vector2(21.9955, -54.1155), Vector2(51, -51)] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Root/Rig/Body/HandR:rotation") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0, 0.0] +} +tracks/20/type = "value" +tracks/20/imported = false +tracks/20/enabled = true +tracks/20/path = NodePath("Root/Rig/Body/HandR:scale") +tracks/20/interp = 1 +tracks/20/loop_wrap = true +tracks/20/keys = { +"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} + [sub_resource type="Animation" id="Animation_uow76"] resource_name = "spit" length = 0.3 @@ -2285,523 +2292,10 @@ tracks/18/keys = { "values": [false] } -[sub_resource type="Animation" id="Animation_msfb2"] -resource_name = "roll" -length = 0.4 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Root/Rig:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.1, 0.4), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(0, -76), Vector2(0, -38), Vector2(0, -76)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Root/Rig:rotation") -tracks/1/interp = 2 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 2, -"values": [0.0, 2.35619, 6.28319, 12.5664] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Root/Rig:scale") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 0.5), Vector2(1, 0.5), Vector2(1, 0.5), Vector2(1, 1)] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Root/Rig/LegL:position") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(-29, 65), Vector2(-24.8287, 40.1066), Vector2(-24.8287, 40.1066), Vector2(-29, 65)] -} -tracks/4/type = "value" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("Root/Rig/LegL:rotation") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0, 0.0] -} -tracks/5/type = "value" -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/path = NodePath("Root/Rig/LegL:scale") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/6/type = "value" -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/path = NodePath("Root/Rig/LegR:position") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(31, 65), Vector2(26.1794, 41.8884), Vector2(26.1794, 41.8884), Vector2(31, 65)] -} -tracks/7/type = "value" -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/path = NodePath("Root/Rig/LegR:rotation") -tracks/7/interp = 1 -tracks/7/loop_wrap = true -tracks/7/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0, 0.0] -} -tracks/8/type = "value" -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/path = NodePath("Root/Rig/LegR:scale") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/9/type = "value" -tracks/9/imported = false -tracks/9/enabled = true -tracks/9/path = NodePath("Root/Rig/Body:position") -tracks/9/interp = 1 -tracks/9/loop_wrap = true -tracks/9/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(5, 53), Vector2(5, 53), Vector2(5, 53), Vector2(5, 53)] -} -tracks/10/type = "value" -tracks/10/imported = false -tracks/10/enabled = true -tracks/10/path = NodePath("Root/Rig/Body:rotation") -tracks/10/interp = 1 -tracks/10/loop_wrap = true -tracks/10/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0, 0.0] -} -tracks/11/type = "value" -tracks/11/imported = false -tracks/11/enabled = true -tracks/11/path = NodePath("Root/Rig/Body:scale") -tracks/11/interp = 1 -tracks/11/loop_wrap = true -tracks/11/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/12/type = "value" -tracks/12/imported = false -tracks/12/enabled = true -tracks/12/path = NodePath("Root/Rig/Body/Hat:position") -tracks/12/interp = 1 -tracks/12/loop_wrap = true -tracks/12/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(2, -91), Vector2(2, -91), Vector2(2, -91), Vector2(2, -91)] -} -tracks/13/type = "value" -tracks/13/imported = false -tracks/13/enabled = true -tracks/13/path = NodePath("Root/Rig/Body/Hat:rotation") -tracks/13/interp = 1 -tracks/13/loop_wrap = true -tracks/13/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0, 0.0] -} -tracks/14/type = "value" -tracks/14/imported = false -tracks/14/enabled = true -tracks/14/path = NodePath("Root/Rig/Body/Hat:scale") -tracks/14/interp = 1 -tracks/14/loop_wrap = true -tracks/14/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/15/type = "value" -tracks/15/imported = false -tracks/15/enabled = true -tracks/15/path = NodePath("Root/Rig/Body/HandL:position") -tracks/15/interp = 1 -tracks/15/loop_wrap = true -tracks/15/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(-60, -53), Vector2(-19.9999, -52.9358), Vector2(-19.9999, -52.9358), Vector2(-60, -53)] -} -tracks/16/type = "value" -tracks/16/imported = false -tracks/16/enabled = true -tracks/16/path = NodePath("Root/Rig/Body/HandL:rotation") -tracks/16/interp = 1 -tracks/16/loop_wrap = true -tracks/16/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0, 0.0] -} -tracks/17/type = "value" -tracks/17/imported = false -tracks/17/enabled = true -tracks/17/path = NodePath("Root/Rig/Body/HandL:scale") -tracks/17/interp = 1 -tracks/17/loop_wrap = true -tracks/17/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/18/type = "value" -tracks/18/imported = false -tracks/18/enabled = true -tracks/18/path = NodePath("Root/Rig/Body/HandR:position") -tracks/18/interp = 1 -tracks/18/loop_wrap = true -tracks/18/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(51, -51), Vector2(21.9955, -54.1155), Vector2(21.9955, -54.1155), Vector2(51, -51)] -} -tracks/19/type = "value" -tracks/19/imported = false -tracks/19/enabled = true -tracks/19/path = NodePath("Root/Rig/Body/HandR:rotation") -tracks/19/interp = 1 -tracks/19/loop_wrap = true -tracks/19/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0, 0.0] -} -tracks/20/type = "value" -tracks/20/imported = false -tracks/20/enabled = true -tracks/20/path = NodePath("Root/Rig/Body/HandR:scale") -tracks/20/interp = 1 -tracks/20/loop_wrap = true -tracks/20/keys = { -"times": PackedFloat32Array(0, 0.1, 0.3, 0.4), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} - -[sub_resource type="Animation" id="Animation_s1dey"] -resource_name = "attack_first" -length = 0.3 -step = 0.05 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Root/Rig:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(0, -76)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Root/Rig:rotation") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0.0] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Root/Rig:scale") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(1, 1)] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Root/Rig/LegL:position") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(-29, 65), Vector2(-29, 65), Vector2(-48, 48)] -} -tracks/4/type = "value" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("Root/Rig/LegL:rotation") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, 0.397498, 0.918872] -} -tracks/5/type = "value" -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/path = NodePath("Root/Rig/LegL:scale") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/6/type = "value" -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/path = NodePath("Root/Rig/LegR:position") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(31, 65), Vector2(50, 51), Vector2(35, 68)] -} -tracks/7/type = "value" -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/path = NodePath("Root/Rig/LegR:rotation") -tracks/7/interp = 1 -tracks/7/loop_wrap = true -tracks/7/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, -0.401688, -0.125403] -} -tracks/8/type = "value" -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/path = NodePath("Root/Rig/LegR:scale") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/9/type = "value" -tracks/9/imported = false -tracks/9/enabled = true -tracks/9/path = NodePath("Root/Rig/Body:position") -tracks/9/interp = 1 -tracks/9/loop_wrap = true -tracks/9/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(5, 53), Vector2(5, 53), Vector2(5, 53)] -} -tracks/10/type = "value" -tracks/10/imported = false -tracks/10/enabled = true -tracks/10/path = NodePath("Root/Rig/Body:rotation") -tracks/10/interp = 1 -tracks/10/loop_wrap = true -tracks/10/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, -0.278326, 0.204683] -} -tracks/11/type = "value" -tracks/11/imported = false -tracks/11/enabled = true -tracks/11/path = NodePath("Root/Rig/Body:scale") -tracks/11/interp = 1 -tracks/11/loop_wrap = true -tracks/11/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(0.9, 1.1), Vector2(1.1, 0.9)] -} -tracks/12/type = "value" -tracks/12/imported = false -tracks/12/enabled = true -tracks/12/path = NodePath("Root/Rig/Body/Hat:position") -tracks/12/interp = 1 -tracks/12/loop_wrap = true -tracks/12/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(2, -91)] -} -tracks/13/type = "value" -tracks/13/imported = false -tracks/13/enabled = true -tracks/13/path = NodePath("Root/Rig/Body/Hat:rotation") -tracks/13/interp = 1 -tracks/13/loop_wrap = true -tracks/13/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0.0] -} -tracks/14/type = "value" -tracks/14/imported = false -tracks/14/enabled = true -tracks/14/path = NodePath("Root/Rig/Body/Hat:scale") -tracks/14/interp = 1 -tracks/14/loop_wrap = true -tracks/14/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(1, 1)] -} -tracks/15/type = "value" -tracks/15/imported = false -tracks/15/enabled = true -tracks/15/path = NodePath("Root/Rig/Body/HandL:position") -tracks/15/interp = 1 -tracks/15/loop_wrap = true -tracks/15/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(-60, -53), Vector2(-1.7771, -44.1117), Vector2(-77.4704, -36.9794)] -} -tracks/16/type = "value" -tracks/16/imported = false -tracks/16/enabled = true -tracks/16/path = NodePath("Root/Rig/Body/HandL:rotation") -tracks/16/interp = 1 -tracks/16/loop_wrap = true -tracks/16/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0] -} -tracks/17/type = "value" -tracks/17/imported = false -tracks/17/enabled = true -tracks/17/path = NodePath("Root/Rig/Body/HandL:scale") -tracks/17/interp = 1 -tracks/17/loop_wrap = true -tracks/17/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] -} -tracks/18/type = "value" -tracks/18/imported = false -tracks/18/enabled = true -tracks/18/path = NodePath("Root/Rig/Body/HandR:position") -tracks/18/interp = 1 -tracks/18/loop_wrap = true -tracks/18/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(51, -51), Vector2(-70.2132, -64.2738), Vector2(71.4504, -76.2001)] -} -tracks/19/type = "value" -tracks/19/imported = false -tracks/19/enabled = true -tracks/19/path = NodePath("Root/Rig/Body/HandR:rotation") -tracks/19/interp = 1 -tracks/19/loop_wrap = true -tracks/19/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [0.0, 0.0, 0.0] -} -tracks/20/type = "value" -tracks/20/imported = false -tracks/20/enabled = true -tracks/20/path = NodePath("Root/Rig/Body/HandR:scale") -tracks/20/interp = 1 -tracks/20/loop_wrap = true -tracks/20/keys = { -"times": PackedFloat32Array(0, 0.15, 0.25), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1.6, 1.6)] -} - [sub_resource type="Animation" id="Animation_8wj70"] -resource_name = "attack_second" -length = 0.2 -step = 0.05 +resource_name = "attack_1" +length = 0.28 +step = 0.01 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -3054,14 +2548,540 @@ tracks/20/keys = { "update": 0, "values": [Vector2(1.6, 1.6), Vector2(1.6, 1.6), Vector2(1.6, 1.6), Vector2(1, 1)] } +tracks/21/type = "value" +tracks/21/imported = false +tracks/21/enabled = true +tracks/21/path = NodePath("Root/Hitbox/CollisionShape2D:disabled") +tracks/21/interp = 1 +tracks/21/loop_wrap = true +tracks/21/keys = { +"times": PackedFloat32Array(0, 0.1, 0.15, 0.3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [true, false, true, true] +} + +[sub_resource type="Animation" id="Animation_s1dey"] +resource_name = "attack_2" +length = 0.3 +step = 0.01 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Root/Rig:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0, -76)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Root/Rig:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Root/Rig:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Root/Rig/LegL:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(-29, 65), Vector2(-29, 65), Vector2(-48, 48)] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Root/Rig/LegL:rotation") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, 0.397498, 0.918872] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Root/Rig/LegL:scale") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Root/Rig/LegR:position") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(31, 65), Vector2(50, 51), Vector2(35, 68)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Root/Rig/LegR:rotation") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, -0.401688, -0.125403] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Root/Rig/LegR:scale") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Root/Rig/Body:position") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(5, 53), Vector2(5, 53), Vector2(5, 53)] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Root/Rig/Body:rotation") +tracks/10/interp = 1 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, -0.278326, 0.204683] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Root/Rig/Body:scale") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(0.9, 1.1), Vector2(1.1, 0.9)] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Root/Rig/Body/Hat:position") +tracks/12/interp = 1 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(2, -91)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Root/Rig/Body/Hat:rotation") +tracks/13/interp = 1 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Root/Rig/Body/Hat:scale") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Root/Rig/Body/HandL:position") +tracks/15/interp = 1 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(-60, -53), Vector2(-1.7771, -44.1117), Vector2(-77.4704, -36.9794)] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Root/Rig/Body/HandL:rotation") +tracks/16/interp = 1 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Root/Rig/Body/HandL:scale") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Root/Rig/Body/HandR:position") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(51, -51), Vector2(-70.2132, -64.2738), Vector2(71.4504, -76.2001)] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Root/Rig/Body/HandR:rotation") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0] +} +tracks/20/type = "value" +tracks/20/imported = false +tracks/20/enabled = true +tracks/20/path = NodePath("Root/Rig/Body/HandR:scale") +tracks/20/interp = 1 +tracks/20/loop_wrap = true +tracks/20/keys = { +"times": PackedFloat32Array(0, 0.15, 0.25), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1.6, 1.6)] +} +tracks/21/type = "value" +tracks/21/imported = false +tracks/21/enabled = true +tracks/21/path = NodePath("Root/Hitbox/CollisionShape2D:disabled") +tracks/21/interp = 1 +tracks/21/loop_wrap = true +tracks/21/keys = { +"times": PackedFloat32Array(0, 0.25, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, true] +} + +[sub_resource type="Animation" id="Animation_g7a0r"] +resource_name = "attack_3" +length = 0.35 +step = 0.05 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Root/Rig/Body:position") +tracks/0/interp = 2 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(5, 53), Vector2(-5, 40), Vector2(-5, 40)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Root/Rig/Body:rotation") +tracks/1/interp = 2 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, -0.349066, 0.436332] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Root/Rig/Body:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(0.9, 1.1), Vector2(1.1, 0.9)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Root/Rig/Body/Hat:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(2, -91)] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Root/Rig/Body/Hat:rotation") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Root/Rig/Body/Hat:scale") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Root/Rig/Body/HandL:position") +tracks/6/interp = 2 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0, 0.2, 0.25, 0.3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Vector2(-60, -53), Vector2(-93.4894, -42.3521), Vector2(6.40698, 1.6281), Vector2(68.5276, -75.9627)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Root/Rig/Body/HandL:rotation") +tracks/7/interp = 2 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0, 0.2, 0.25, 0.3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, 1.70101, 0.0, 0.0] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Root/Rig/Body/HandL:scale") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(2, 2), Vector2(3, 3)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Root/Rig/Body/HandR:position") +tracks/9/interp = 2 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(51, -51), Vector2(-1.40495, -52.6598), Vector2(-66.8689, -27.8787)] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Root/Rig/Body/HandR:rotation") +tracks/10/interp = 2 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, 0.0, 0.0] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Root/Rig/Body/HandR:scale") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Root/Rig/LegL:position") +tracks/12/interp = 2 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(-29, 65), Vector2(-57, 59), Vector2(37, 63)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Root/Rig/LegL:rotation") +tracks/13/interp = 2 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, 0.706805, -0.742333] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Root/Rig/LegL:scale") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Root/Rig/LegR:position") +tracks/15/interp = 2 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(31, 65), Vector2(31, 65), Vector2(-45, 39)] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Root/Rig/LegR:rotation") +tracks/16/interp = 2 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [0.0, -0.477383, 1.06217] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Root/Rig/LegR:scale") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1), Vector2(1, 1)] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Root/FX/Cloud:visible") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Root/Hitbox/CollisionShape2D:disabled") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0, 0.25, 0.35), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, true] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_ws2ti"] _data = { "RESET": SubResource("Animation_nvm4d"), -"attack": SubResource("Animation_g7a0r"), -"attack_first": SubResource("Animation_s1dey"), +"attack_1": SubResource("Animation_8wj70"), +"attack_2": SubResource("Animation_s1dey"), +"attack_3": SubResource("Animation_g7a0r"), "attack_ranged": SubResource("Animation_b0ub6"), -"attack_second": SubResource("Animation_8wj70"), "death": SubResource("Animation_wei72"), "hurt": SubResource("Animation_gowr5"), "idle": SubResource("Animation_gnqgt"), @@ -3132,19 +3152,18 @@ region_enabled = true region_rect = Rect2(300, 0, 100, 70) [node name="Death" type="GPUParticles2D" parent="Root/FX"] -position = Vector2(0, 68) +position = Vector2(0, 52) emitting = false +amount = 16 process_material = SubResource("ParticleProcessMaterial_f5i1x") texture = ExtResource("4_mnb6v") lifetime = 0.7 one_shot = true -speed_scale = 1.6 explosiveness = 0.7 +fixed_fps = 60 [node name="Hitbox" type="Area2D" parent="Root"] position = Vector2(50, 0) -collision_layer = 0 -collision_mask = 4 script = ExtResource("5_taq6b") [node name="CollisionShape2D" type="CollisionShape2D" parent="Root/Hitbox"] @@ -3154,8 +3173,6 @@ debug_color = Color(0.933131, 0.0801983, 0.605982, 0.42) metadata/_edit_lock_ = true [node name="Hurtbox" type="Area2D" parent="Root" node_paths=PackedStringArray("health")] -collision_layer = 4 -collision_mask = 0 script = ExtResource("6_jnvxm") health = NodePath("../../Health") diff --git a/demo/demo/agents/agent_base_enemy.tscn b/demo/demo/agents/agent_base_enemy.tscn index 04a4409..1c1d7a3 100644 --- a/demo/demo/agents/agent_base_enemy.tscn +++ b/demo/demo/agents/agent_base_enemy.tscn @@ -9,8 +9,8 @@ var/speed/name = "speed" var/speed/type = 3 var/speed/value = 400.0 -var/speed/hint = 0 -var/speed/hint_string = "" +var/speed/hint = 1 +var/speed/hint_string = "10,1000,10" [node name="AgentEnemy" instance=ExtResource("1_uffd7")] script = ExtResource("2_w7f5y") diff --git a/demo/demo/agents/player/player.gd b/demo/demo/agents/player/player.gd index 270cef1..61406a9 100644 --- a/demo/demo/agents/player/player.gd +++ b/demo/demo/agents/player/player.gd @@ -21,7 +21,8 @@ func _unhandled_input(event: InputEvent) -> void: func _init_state_machine() -> void: hsm.add_transition(idle_state, move_state, idle_state.EVENT_FINISHED) hsm.add_transition(move_state, idle_state, move_state.EVENT_FINISHED) - hsm.add_transition(hsm.ANYSTATE, attack_state, "attack!") + hsm.add_transition(idle_state, attack_state, "attack!") + hsm.add_transition(move_state, attack_state, "attack!") hsm.add_transition(attack_state, move_state, attack_state.EVENT_FINISHED) hsm.initialize(self) hsm.set_active(true) diff --git a/demo/demo/agents/player/player.tscn b/demo/demo/agents/player/player.tscn index 1dff6ca..85c7787 100644 --- a/demo/demo/agents/player/player.tscn +++ b/demo/demo/agents/player/player.tscn @@ -24,4 +24,4 @@ animation = &"walk" [node name="AttackState" type="LimboState" parent="LimboHSM" index="2" node_paths=PackedStringArray("animation_player")] script = ExtResource("5_mpgu6") animation_player = NodePath("../../AnimationPlayer") -animation = &"attack" +animations = Array[StringName]([&"attack_1", &"attack_2", &"attack_3"]) diff --git a/demo/demo/agents/player/states/attack_state.gd b/demo/demo/agents/player/states/attack_state.gd index 5f6f295..63b28b5 100644 --- a/demo/demo/agents/player/states/attack_state.gd +++ b/demo/demo/agents/player/states/attack_state.gd @@ -1,13 +1,29 @@ extends LimboState -## Idle state. +## Attack state: Perform 3-part combo attack for as long as player hits attack button. @export var animation_player: AnimationPlayer -@export var animation: StringName +@export var animations: Array[StringName] + +var attack_pressed: int + + +func _unhandled_input(event: InputEvent) -> void: + if event.is_echo(): + return + if event.is_action_pressed("attack"): + attack_pressed += 1 func _enter() -> void: - animation_player.play(animation) - await animation_player.animation_finished + attack_pressed = 0 + for idx in animations.size(): + animation_player.play(animations[idx]) + await animation_player.animation_finished + if attack_pressed <= 0 or not is_active(): + # Interrupt combo if player didn't press attack button again, + # or state is no longer active. + break + attack_pressed -= 1 if is_active(): get_root().dispatch(EVENT_FINISHED) diff --git a/demo/demo/agents/player/states/idle_state.gd b/demo/demo/agents/player/states/idle_state.gd index fdbe8ab..b9e9060 100644 --- a/demo/demo/agents/player/states/idle_state.gd +++ b/demo/demo/agents/player/states/idle_state.gd @@ -1,7 +1,7 @@ extends LimboState - ## Idle state. + @export var animation_player: AnimationPlayer @export var animation: StringName diff --git a/demo/demo/agents/player/states/move_state.gd b/demo/demo/agents/player/states/move_state.gd index 78dd23e..6173c2a 100644 --- a/demo/demo/agents/player/states/move_state.gd +++ b/demo/demo/agents/player/states/move_state.gd @@ -1,13 +1,14 @@ extends LimboState +## Move state. + const VERTICAL_FACTOR := 0.8 -## Move state. - @export var animation_player: AnimationPlayer @export var animation: StringName @export var speed: float = 500.0 + func _enter() -> void: animation_player.play(animation, 0.1) diff --git a/demo/demo/agents/scripts/agent_base.gd b/demo/demo/agents/scripts/agent_base.gd index d7f444a..2a39604 100644 --- a/demo/demo/agents/scripts/agent_base.gd +++ b/demo/demo/agents/scripts/agent_base.gd @@ -47,7 +47,6 @@ func _damaged(_amount: float) -> void: hsm.set_active(true) - func _die() -> void: animation_player.play(&"death") diff --git a/demo/demo/agents/scripts/health.gd b/demo/demo/agents/scripts/health.gd index 9c45789..2c450ff 100644 --- a/demo/demo/agents/scripts/health.gd +++ b/demo/demo/agents/scripts/health.gd @@ -1,8 +1,8 @@ class_name Health extends Node - ## Tracks health and emits signal when damaged or dead. + signal death signal damaged(amount: float) @@ -16,6 +16,9 @@ func _ready() -> void: func take_damage(amount: float) -> void: + if _current <= 0: + return + _current -= amount _current = max(_current, 0.0) diff --git a/demo/demo/agents/scripts/hitbox.gd b/demo/demo/agents/scripts/hitbox.gd index 66a53bb..a2361f2 100644 --- a/demo/demo/agents/scripts/hitbox.gd +++ b/demo/demo/agents/scripts/hitbox.gd @@ -1,14 +1,20 @@ class_name Hitbox extends Area2D - ## Area that deals damage. + @export var damage: float = 1.0 + +func _init() -> void: + collision_layer = 0 + collision_mask = 4 + + func _ready() -> void: - area_entered.connect(_on_area_entered) + area_entered.connect(_area_entered) -func _on_area_entered(area: Area2D) -> void: +func _area_entered(area: Area2D) -> void: var hurtbox := area as Hurtbox hurtbox.take_damage(damage, self) diff --git a/demo/demo/agents/scripts/hurtbox.gd b/demo/demo/agents/scripts/hurtbox.gd index 60611ea..8559f47 100644 --- a/demo/demo/agents/scripts/hurtbox.gd +++ b/demo/demo/agents/scripts/hurtbox.gd @@ -1,11 +1,16 @@ class_name Hurtbox extends Area2D - ## Area that registers damage. + @export var health: Health +func _init() -> void: + collision_layer = 4 + collision_mask = 0 + + func take_damage(amount: float, source: Area2D) -> void: if source.owner == owner: # Don't damage yourself. diff --git a/demo/demo/ai/tasks/pursue.gd b/demo/demo/ai/tasks/pursue.gd index 77d9a17..b4b89f0 100644 --- a/demo/demo/ai/tasks/pursue.gd +++ b/demo/demo/ai/tasks/pursue.gd @@ -1,5 +1,11 @@ @tool extends BTAction +## Pursue target. +## +## Returns RUNNING, while moving towards target but not yet at the desired distance. +## Returns SUCCESS, when at the desired distance from target. +## Returns FAILURE, if target is not a valid instance. + const TOLERANCE := 30.0 diff --git a/demo/demo/ai/trees/enemy_melee_simple.tres b/demo/demo/ai/trees/enemy_melee_simple.tres index 2352dd6..d3b38af 100644 --- a/demo/demo/ai/trees/enemy_melee_simple.tres +++ b/demo/demo/ai/trees/enemy_melee_simple.tres @@ -12,8 +12,8 @@ var/speed/hint = 1 var/speed/hint_string = "10,1000,10" [sub_resource type="BBNode" id="BBNode_nrd4b"] -resource_name = "AnimationPlayer" saved_value = NodePath("AnimationPlayer") +resource_name = "AnimationPlayer" [sub_resource type="BTPlayAnimation" id="BTPlayAnimation_qiw21"] animation_player = SubResource("BBNode_nrd4b") @@ -29,8 +29,8 @@ custom_name = "Pause before action" children = [SubResource("BTPlayAnimation_qiw21"), SubResource("BTRandomWait_xlud8")] [sub_resource type="BBNode" id="BBNode_wpj6d"] -resource_name = "AnimationPlayer" saved_value = NodePath("AnimationPlayer") +resource_name = "AnimationPlayer" [sub_resource type="BTPlayAnimation" id="BTPlayAnimation_olf37"] animation_player = SubResource("BBNode_wpj6d") @@ -46,11 +46,11 @@ output_var = "_target" script = ExtResource("2_h5db5") target_var = "_target" speed_var = "speed" -approach_distance = null +approach_distance = 100.0 [sub_resource type="BTTimeLimit" id="BTTimeLimit_xek5v"] -children = [SubResource("BTAction_a4jqi")] time_limit = 2.0 +children = [SubResource("BTAction_a4jqi")] [sub_resource type="BTSequence" id="BTSequence_1xfnq"] custom_name = "Pursue player" @@ -64,13 +64,13 @@ target_var = "_target" duration = 0.1 [sub_resource type="BBNode" id="BBNode_s8evu"] -resource_name = "AnimationPlayer" saved_value = NodePath("AnimationPlayer") +resource_name = "AnimationPlayer" [sub_resource type="BTPlayAnimation" id="BTPlayAnimation_ppmxd"] await_completion = 2.0 animation_player = SubResource("BBNode_s8evu") -animation_name = &"attack" +animation_name = &"attack_3" [sub_resource type="BTSequence" id="BTSequence_ww5v2"] custom_name = "Melee attack" diff --git a/demo/demo/scenes/demo.tscn b/demo/demo/scenes/demo.tscn index 25f54b7..8fb2f90 100644 --- a/demo/demo/scenes/demo.tscn +++ b/demo/demo/scenes/demo.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://bsig1usigbbuy"] +[gd_scene load_steps=11 format=3 uid="uid://bsig1usigbbuy"] [ext_resource type="Texture2D" uid="uid://b3g14elmg0m36" path="res://demo/assets/env_rocks.png" id="1_145kx"] [ext_resource type="PackedScene" uid="uid://dt2jlrqffpyw" path="res://demo/scenes/clouds.tscn" id="1_gsxmp"] @@ -7,7 +7,6 @@ [ext_resource type="PackedScene" uid="uid://bpd1wmw2f7bvg" path="res://demo/props/gong.tscn" id="3_nbto3"] [ext_resource type="PackedScene" uid="uid://d07ag5dcje13i" path="res://demo/agents/player/player.tscn" id="5_cmgoj"] [ext_resource type="PackedScene" uid="uid://sjans5psq6pg" path="res://demo/agents/agent_base_enemy.tscn" id="5_knyss"] -[ext_resource type="PackedScene" uid="uid://comfxjrcylgb" path="res://demo/agents/agent_melee_simple.tscn" id="7_ruy6b"] [sub_resource type="Animation" id="Animation_gwtgs"] length = 0.001 @@ -2873,9 +2872,6 @@ metadata/_edit_lock_ = true y_sort_enabled = true metadata/_edit_lock_ = true -[node name="AgentMeleeSimple" parent="YSort/Agents" instance=ExtResource("7_ruy6b")] -position = Vector2(1212, 333) - [node name="AgentEnemy" parent="YSort/Agents" instance=ExtResource("5_knyss")] position = Vector2(1527.4, 690.665) diff --git a/demo/export_presets.cfg b/demo/export_presets.cfg new file mode 100644 index 0000000..f29e133 --- /dev/null +++ b/demo/export_presets.cfg @@ -0,0 +1,37 @@ +[preset.0] + +name="Web" +platform="Web" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +variant/extensions_support=false +vram_texture_compression/for_desktop=true +vram_texture_compression/for_mobile=false +html/export_icon=true +html/custom_html_shell="" +html/head_include="" +html/canvas_resize_policy=2 +html/focus_canvas_on_start=true +html/experimental_virtual_keyboard=false +progressive_web_app/enabled=false +progressive_web_app/offline_page="" +progressive_web_app/display=1 +progressive_web_app/orientation=0 +progressive_web_app/icon_144x144="" +progressive_web_app/icon_180x180="" +progressive_web_app/icon_512x512="" +progressive_web_app/background_color=Color(0, 0, 0, 1) diff --git a/demo/project.godot b/demo/project.godot index de72bcd..b1ba4c0 100644 --- a/demo/project.godot +++ b/demo/project.godot @@ -19,6 +19,9 @@ config/icon="res://demo/icon.svg" window/size/viewport_width=1920 window/size/viewport_height=1080 +window/size/window_width_override=1280 +window/size/window_height_override=720 +window/stretch/mode="canvas_items" [input]