]> Untitled Git - knight.git/commitdiff
Attacking added
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Wed, 20 Nov 2024 10:50:16 +0000 (12:50 +0200)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Wed, 20 Nov 2024 17:07:15 +0000 (19:07 +0200)
player/player.gd
player/player.tscn
project.godot
skin/the-knight.glb
skin/the-knight.tscn
skin/the_knight.gd

index 1c483fa4bf22e5c99ebf689c90e11c98b77b0a04..f6b6c564fd09a213cfa0c63ff575aa412f7ab6ab 100644 (file)
@@ -1,7 +1,7 @@
 extends CharacterBody3D
 
 
-@onready var _skin: Node3D = $skin
+@onready var _skin: KnightSkin = $skin
 
 
 const SPEED = 5.0
@@ -15,17 +15,11 @@ var _last_movement_direction := Vector3.FORWARD
 func _input(event: InputEvent) -> void:
        if event.is_action_released("ui_accept"):
                velocity.y = 0
+       elif event.is_action_pressed("player-attack"):
+               _skin.attack()
 
 
-func _physics_process(delta: float) -> void:
-       # Add the gravity.
-       if not is_on_floor():
-               velocity += get_gravity() * FALL_SPEED * delta
-
-       # Handle jump.
-       if Input.is_action_just_pressed("ui_accept") and is_on_floor():
-               velocity.y = JUMP_VELOCITY
-
+func _process_player_input(_delta: float) -> void:
        # Get the input direction and handle the movement/deceleration.
        # As good practice, you should replace UI actions with custom gameplay actions.
        var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
@@ -38,10 +32,26 @@ func _physics_process(delta: float) -> void:
                velocity.x = 0
                velocity.z = 0
 
-       move_and_slide()
+       # Handle jump.
+       if Input.is_action_just_pressed("ui_accept") and is_on_floor():
+               velocity.y = JUMP_VELOCITY
+
 
+func _process_player_skin(_delta: float) -> void:
+       _skin.global_rotation.y = Vector3.BACK.signed_angle_to(_last_movement_direction, Vector3.UP)
+       
        if is_on_floor():
-               _skin.forward(velocity.length())
-               _skin.global_rotation.y = Vector3.BACK.signed_angle_to(_last_movement_direction, Vector3.UP)
+               _skin.move(velocity.length())
        else:
                _skin.fall()
+
+
+func _physics_process(delta: float) -> void:
+       # Add the gravity.
+       if not is_on_floor():
+               velocity += get_gravity() * FALL_SPEED * delta
+
+       _process_player_input(delta)
+       _process_player_skin(delta)
+       
+       move_and_slide()
index 7d9c024c8a09473a2436b0389ce50f634563c12f..a71acd89d3cb77c6e10eb0935dfcd4818a502fa6 100644 (file)
@@ -4,8 +4,8 @@
 [ext_resource type="Script" path="res://player/player.gd" id="1_lnm7a"]
 
 [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ew3kx"]
-radius = 0.202782
-height = 0.857531
+radius = 0.149709
+height = 0.763706
 
 [sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_tmjox"]
 dof_blur_far_enabled = true
@@ -19,7 +19,7 @@ dof_blur_amount = 0.2
 script = ExtResource("1_lnm7a")
 
 [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
-transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.459262, 0)
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.37972, 0)
 shape = SubResource("CapsuleShape3D_ew3kx")
 
 [node name="skin" parent="." instance=ExtResource("1_3dem8")]
index 631f3c71b9fbb40987e8365414df077a0aac7c2e..2b6d068745a52ae4da58c5caa6e76eae777bc964 100644 (file)
@@ -17,5 +17,13 @@ config/icon="res://icon.svg"
 
 [display]
 
-window/size/viewport_width=2304
-window/size/viewport_height=1296
+window/size/viewport_width=3456
+window/size/viewport_height=1944
+
+[input]
+
+player-attack={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
+]
+}
index 266a8509a53ca0869ea1a8e0d2eae0489d89a773..52de9efbcd1fb97e6f3cfbe1e17a97ba438ca4a8 100644 (file)
Binary files a/skin/the-knight.glb and b/skin/the-knight.glb differ
index 7d0954220682a9f6de2204b7dcfebfa6d6cf5246..69bbcdb0012186e10b5c4048f132bcb872e7740f 100644 (file)
-[gd_scene load_steps=12 format=3 uid="uid://bgmpst4q8lyw2"]
+[gd_scene load_steps=13 format=3 uid="uid://bgmpst4q8lyw2"]
 
 [ext_resource type="PackedScene" uid="uid://dd5nled5di42i" path="res://skin/the-knight.glb" id="1_mro73"]
 [ext_resource type="Script" path="res://skin/the_knight.gd" id="2_ofwyo"]
 
-[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_gbkev"]
+[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_kfgya"]
+
+[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_a0atl"]
 animation = &"attack-default"
 
-[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_lvwr6"]
+[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_a6lqo"]
+filter_enabled = true
+filters = ["", "base/rig/Skeleton3D:DEF-forearm.L", "base/rig/Skeleton3D:DEF-forearm.L.001", "base/rig/Skeleton3D:DEF-forearm.R", "base/rig/Skeleton3D:DEF-forearm.R.001", "base/rig/Skeleton3D:DEF-hand.L", "base/rig/Skeleton3D:DEF-hand.R", "base/rig/Skeleton3D:DEF-shoulder.L", "base/rig/Skeleton3D:DEF-shoulder.R", "base/rig/Skeleton3D:DEF-spine", "base/rig/Skeleton3D:DEF-spine.002", "base/rig/Skeleton3D:DEF-spine.003", "base/rig/Skeleton3D:DEF-spine.004", "base/rig/Skeleton3D:DEF-spine.005", "base/rig/Skeleton3D:DEF-spine.006", "base/rig/Skeleton3D:DEF-upper_arm.L", "base/rig/Skeleton3D:DEF-upper_arm.L.001", "base/rig/Skeleton3D:DEF-upper_arm.R", "base/rig/Skeleton3D:DEF-upper_arm.R.001", "base/rig/Skeleton3D:nail-back", "base/rig/Skeleton3D:nail-hand.L", "rig/Skeleton3D:DEF-forearm.L", "rig/Skeleton3D:DEF-forearm.L.001", "rig/Skeleton3D:DEF-forearm.R", "rig/Skeleton3D:DEF-forearm.R.001", "rig/Skeleton3D:DEF-hand.L", "rig/Skeleton3D:DEF-hand.R", "rig/Skeleton3D:DEF-shoulder.L", "rig/Skeleton3D:DEF-shoulder.R", "rig/Skeleton3D:DEF-spine", "rig/Skeleton3D:DEF-spine.002", "rig/Skeleton3D:DEF-spine.003", "rig/Skeleton3D:DEF-spine.004", "rig/Skeleton3D:DEF-spine.005", "rig/Skeleton3D:DEF-spine.006", "rig/Skeleton3D:DEF-upper_arm.L", "rig/Skeleton3D:DEF-upper_arm.L.001", "rig/Skeleton3D:DEF-upper_arm.R", "rig/Skeleton3D:DEF-upper_arm.R.001", "rig/Skeleton3D:nail-back_2", "rig/Skeleton3D:nail-hand.L"]
+sync = true
+
+[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pbq7e"]
 animation = &"move-jump"
 
-[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_usd73"]
+[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ego33"]
 animation = &"idle-default"
 
-[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2l48s"]
+[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2l36w"]
 animation = &"move-walk"
 
-[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_fbyfq"]
+[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_suq0c"]
 animation = &"move-run"
 
-[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_73suy"]
-blend_point_0/node = SubResource("AnimationNodeAnimation_usd73")
+[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_446cp"]
+blend_point_0/node = SubResource("AnimationNodeAnimation_ego33")
 blend_point_0/pos = 0.0
-blend_point_1/node = SubResource("AnimationNodeAnimation_2l48s")
+blend_point_1/node = SubResource("AnimationNodeAnimation_2l36w")
 blend_point_1/pos = 0.5
-blend_point_2/node = SubResource("AnimationNodeAnimation_fbyfq")
+blend_point_2/node = SubResource("AnimationNodeAnimation_suq0c")
 blend_point_2/pos = 1.0
 min_space = 0.0
 sync = true
 
-[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_klojh"]
-animation = &"idle-default"
-
 [sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_87yve"]
 sync = true
 xfade_time = 0.1
-input_0/name = "forward"
+input_0/name = "move"
 input_0/auto_advance = false
 input_0/break_loop_at_end = false
 input_0/reset = true
-input_1/name = "idle"
+input_1/name = "jump"
 input_1/auto_advance = false
 input_1/break_loop_at_end = false
 input_1/reset = true
-input_2/name = "fall"
-input_2/auto_advance = false
-input_2/break_loop_at_end = false
-input_2/reset = true
-input_3/name = "attack"
-input_3/auto_advance = true
-input_3/break_loop_at_end = false
-input_3/reset = true
 
 [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xdiqd"]
-graph_offset = Vector2(-978.475, -4.15498)
-nodes/Animation/node = SubResource("AnimationNodeAnimation_gbkev")
-nodes/Animation/position = Vector2(-560, 520)
-nodes/fall/node = SubResource("AnimationNodeAnimation_lvwr6")
-nodes/fall/position = Vector2(-570, 370)
-nodes/forward/node = SubResource("AnimationNodeBlendSpace1D_73suy")
-nodes/forward/position = Vector2(-580, 50)
-nodes/idle/node = SubResource("AnimationNodeAnimation_klojh")
-nodes/idle/position = Vector2(-570, 220)
+graph_offset = Vector2(-595.2, -44.16)
+nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_kfgya")
+nodes/TimeScale/position = Vector2(80, 300)
+nodes/attack/node = SubResource("AnimationNodeOneShot_a6lqo")
+nodes/attack/position = Vector2(300, 120)
+"nodes/attack 2/node" = SubResource("AnimationNodeAnimation_a0atl")
+"nodes/attack 2/position" = Vector2(-160, 390)
+nodes/jump/node = SubResource("AnimationNodeAnimation_pbq7e")
+nodes/jump/position = Vector2(-540, 240)
+nodes/move/node = SubResource("AnimationNodeBlendSpace1D_446cp")
+nodes/move/position = Vector2(-556.457, 77.4483)
 nodes/movement/node = SubResource("AnimationNodeTransition_87yve")
-nodes/movement/position = Vector2(-260, 140)
-node_connections = [&"movement", 0, &"forward", &"movement", 1, &"idle", &"movement", 2, &"fall", &"movement", 3, &"Animation", &"output", 0, &"movement"]
+nodes/movement/position = Vector2(-250, 150)
+nodes/output/position = Vector2(670, 140)
+node_connections = [&"TimeScale", 0, &"attack 2", &"attack", 0, &"movement", &"attack", 1, &"TimeScale", &"movement", 0, &"move", &"movement", 1, &"jump", &"output", 0, &"attack"]
 
 [node name="the-knight" instance=ExtResource("1_mro73")]
 script = ExtResource("2_ofwyo")
 
-[node name="Skeleton3D" parent="base/rig" index="0"]
-bones/1/position = Vector3(-1.77636e-15, 0.03312, 0.292604)
-bones/1/rotation = Quaternion(0.804573, 7.0793e-08, 9.59125e-08, 0.593854)
-bones/3/rotation = Quaternion(-0.0924557, 1.18699e-07, -1.10216e-08, 0.995717)
-bones/4/rotation = Quaternion(0.00901271, -1.19204e-07, 1.07438e-09, 0.999959)
+[node name="Skeleton3D" parent="rig" index="0"]
+bones/0/position = Vector3(0, 0.292604, -0.03312)
+bones/0/rotation = Quaternion(0.149, 1.17879e-07, 1.77622e-08, 0.988837)
+bones/2/rotation = Quaternion(-0.0924557, 1.18699e-07, -1.10216e-08, 0.995717)
+bones/3/rotation = Quaternion(0.00901271, -1.19204e-07, 1.07438e-09, 0.999959)
+bones/3/scale = Vector3(1, 1, 1)
+bones/4/rotation = Quaternion(0.229497, 1.16028e-07, 2.73582e-08, 0.973309)
 bones/4/scale = Vector3(1, 1, 1)
-bones/5/rotation = Quaternion(0.229497, 1.16028e-07, 2.73582e-08, 0.973309)
-bones/5/scale = Vector3(1, 1, 1)
-bones/6/rotation = Quaternion(-0.109628, -1.18491e-07, -1.30686e-08, 0.993973)
-bones/7/rotation = Quaternion(-0.111466, 1.18466e-07, -1.32878e-08, 0.993768)
-bones/8/position = Vector3(0.13946, 0.112574, 0.446366)
-bones/8/rotation = Quaternion(0.304076, 0.928459, 0.110328, 0.182566)
-bones/8/scale = Vector3(1, 17.7865, 1)
-bones/9/position = Vector3(-0.13946, 0.112574, 0.446366)
-bones/9/rotation = Quaternion(-0.304076, 0.928459, 0.110328, -0.182566)
-bones/9/scale = Vector3(1, 17.7865, 1)
-bones/10/position = Vector3(0.0733334, -0.00369957, 0.142112)
-bones/10/rotation = Quaternion(0.999985, 3.48704e-08, 8.36928e-08, -0.00540465)
-bones/10/scale = Vector3(1, 22.9334, 1)
-bones/11/position = Vector3(-0.0733334, -0.00369957, 0.142112)
-bones/11/rotation = Quaternion(0.999985, -3.48704e-08, -8.36928e-08, -0.00540465)
-bones/11/scale = Vector3(1, 22.9334, 1)
-bones/16/rotation = Quaternion(0.913341, -7.07102e-08, 0.407195, 3.58881e-08)
-bones/25/rotation = Quaternion(-0.171685, -0.790881, -0.308025, 0.500152)
-bones/25/scale = Vector3(1, 1, 1)
-bones/27/rotation = Quaternion(-0.171685, 0.790881, 0.308025, 0.500152)
-bones/27/scale = Vector3(1, 1, 1)
-bones/29/rotation = Quaternion(0.980879, -1.75858e-08, 2.3549e-07, 0.194617)
-bones/29/scale = Vector3(1, 1, 1)
-bones/30/rotation = Quaternion(0.119238, 2.26485e-14, 2.84283e-08, 0.992866)
-bones/30/scale = Vector3(1, 1, 1)
-bones/31/rotation = Quaternion(-0.547448, 7.58144e-09, -1.46473e-07, 0.83684)
-bones/31/scale = Vector3(1, 1, 0.999999)
-bones/32/position = Vector3(1.74337e-08, 0.0775473, -2.3555e-08)
-bones/32/rotation = Quaternion(3.28639e-08, 0.961249, -0.275683, 1.1459e-07)
-bones/32/scale = Vector3(1, 1, 1)
-bones/33/rotation = Quaternion(0.342783, 0.342783, -0.618466, 0.618466)
-bones/36/scale = Vector3(1, 1, 1)
-bones/38/rotation = Quaternion(1.86265e-08, -5.5398e-08, -1.74988e-08, 1)
-bones/38/scale = Vector3(1, 1, 0.999999)
-bones/40/scale = Vector3(1, 1, 1)
-bones/41/rotation = Quaternion(-3.55765e-07, 1.96604e-09, -1.75672e-08, 1)
-bones/43/rotation = Quaternion(0.980879, -2.88144e-08, -1.6302e-09, 0.194617)
-bones/43/scale = Vector3(1, 1, 1)
-bones/44/rotation = Quaternion(0.119238, -3.44169e-14, -2.84284e-08, 0.992866)
-bones/45/rotation = Quaternion(-0.547448, -7.58145e-09, 1.46473e-07, 0.83684)
-bones/45/scale = Vector3(1, 1, 0.999999)
-bones/46/position = Vector3(-1.74337e-08, 0.0775473, -2.59373e-08)
-bones/46/rotation = Quaternion(-3.28639e-08, 0.961249, -0.275683, -1.1459e-07)
-bones/46/scale = Vector3(1, 1, 1)
-bones/47/rotation = Quaternion(-0.618466, 0.618466, 0.342783, 0.342783)
-bones/47/scale = Vector3(1, 1, 1)
-bones/50/scale = Vector3(1, 1, 1)
-bones/52/rotation = Quaternion(3.72529e-09, 5.5398e-08, 1.74988e-08, 1)
-bones/52/scale = Vector3(1, 1, 0.999999)
-bones/54/scale = Vector3(1, 1, 1)
-bones/55/rotation = Quaternion(3.89293e-07, -2.18893e-09, 1.75668e-08, 1)
-bones/55/scale = Vector3(1, 1, 1)
-bones/57/rotation = Quaternion(0.980879, 2.14427e-08, 1.08072e-07, 0.194617)
-bones/57/scale = Vector3(1, 1, 0.999999)
-bones/58/rotation = Quaternion(-0.804572, -7.86797e-08, -1.01734e-07, 0.593854)
-bones/58/scale = Vector3(1, 1, 1)
-bones/59/rotation = Quaternion(-0.739083, 7.30564e-08, -8.15026e-08, 0.673615)
-bones/59/scale = Vector3(1, 1, 1)
-bones/60/rotation = Quaternion(0.119237, -2.16681e-14, 2.84284e-08, 0.992866)
-bones/61/rotation = Quaternion(-0.547447, -2.54723e-14, -1.30522e-07, 0.83684)
-bones/61/scale = Vector3(1, 1, 1)
-bones/62/rotation = Quaternion(-4.47035e-08, 1.24345e-14, -1.72343e-15, 1)
-bones/63/rotation = Quaternion(4.49144e-08, 0.961249, -0.275683, 7.25723e-08)
-bones/63/scale = Vector3(1, 1, 1)
-bones/64/rotation = Quaternion(-1.49012e-08, -4.37114e-08, -6.51351e-16, 1)
-bones/65/rotation = Quaternion(-0.703275, 7.78544e-08, -7.68683e-08, 0.710918)
-bones/66/rotation = Quaternion(-0.0516915, -9.12947e-10, 5.3134e-09, 0.998663)
-bones/66/scale = Vector3(1, 1, 1)
-bones/67/rotation = Quaternion(0.119238, 1.92069e-14, 2.84284e-08, 0.992866)
-bones/68/rotation = Quaternion(0.980879, -3.03382e-08, 2.39879e-07, 0.194617)
-bones/69/rotation = Quaternion(-7.45059e-09, 2.22045e-16, 4.5513e-08, 1)
-bones/70/rotation = Quaternion(0.980879, -7.4981e-08, 2.48737e-07, 0.194617)
-bones/70/scale = Vector3(1, 1, 1)
-bones/71/rotation = Quaternion(-1.49011e-08, 1.19352e-07, -7.64426e-08, 1)
-bones/72/rotation = Quaternion(0.119238, -1.18216e-07, 6.03186e-08, 0.992866)
-bones/72/scale = Vector3(1, 1, 1)
-bones/73/rotation = Quaternion(1.11759e-08, 6.38114e-08, -1.74988e-08, 1)
-bones/74/rotation = Quaternion(-0.547448, -1.07996e-07, -2.47164e-07, 0.83684)
-bones/74/scale = Vector3(1, 1, 1)
-bones/75/rotation = Quaternion(-5.94909e-08, 0.961249, -0.275682, 1.41077e-07)
-bones/75/scale = Vector3(1, 1, 1)
-bones/76/rotation = Quaternion(0.980879, 2.14427e-08, 1.08072e-07, 0.194617)
-bones/76/scale = Vector3(1, 1, 0.999999)
-bones/77/rotation = Quaternion(-0.804572, -7.86797e-08, -1.01734e-07, 0.593854)
-bones/77/scale = Vector3(1, 1, 1)
-bones/78/rotation = Quaternion(-0.739083, -8.75458e-08, 9.47085e-08, 0.673615)
-bones/78/scale = Vector3(1, 1, 1)
-bones/79/rotation = Quaternion(0.119237, 2.81361e-14, -2.84283e-08, 0.992866)
-bones/80/rotation = Quaternion(-0.547447, 2.54723e-14, 1.30522e-07, 0.83684)
-bones/80/scale = Vector3(1, 1, 1)
-bones/81/rotation = Quaternion(-4.47035e-08, -7.10543e-15, -5.29289e-17, 1)
-bones/82/rotation = Quaternion(-4.49144e-08, 0.961249, -0.275683, -7.25723e-08)
-bones/82/scale = Vector3(1, 1, 1)
-bones/83/rotation = Quaternion(-1.49012e-08, 4.37114e-08, 6.5135e-16, 1)
-bones/84/rotation = Quaternion(-0.703275, -9.16418e-08, 9.08055e-08, 0.710918)
-bones/85/rotation = Quaternion(-0.0516915, 9.12979e-10, -5.31341e-09, 0.998663)
-bones/85/scale = Vector3(1, 1, 1)
-bones/86/rotation = Quaternion(0.119238, -3.27442e-14, -2.84284e-08, 0.992866)
-bones/87/rotation = Quaternion(0.980879, -1.60621e-08, -6.01935e-09, 0.194617)
-bones/89/rotation = Quaternion(0.980879, 1.42762e-08, -1.20388e-08, 0.194617)
-bones/89/scale = Vector3(1, 1, 1)
-bones/90/rotation = Quaternion(-1.11759e-08, -1.19575e-07, 6.18592e-08, 1)
-bones/91/rotation = Quaternion(0.119238, 1.18438e-07, -6.03452e-08, 0.992866)
-bones/91/scale = Vector3(1, 1, 1)
-bones/92/rotation = Quaternion(1.86264e-08, -6.38114e-08, 1.74988e-08, 1)
-bones/93/rotation = Quaternion(-0.547448, 1.07996e-07, 2.47164e-07, 0.83684)
-bones/93/scale = Vector3(1, 1, 1)
-bones/94/rotation = Quaternion(5.94909e-08, 0.961249, -0.275682, -1.41077e-07)
-bones/94/scale = Vector3(1, 1, 1)
-bones/95/rotation = Quaternion(-0.0759225, -1.18865e-07, -9.05066e-09, 0.997114)
-bones/99/rotation = Quaternion(0.693526, 8.58822e-08, 8.26747e-08, 0.720432)
-bones/100/rotation = Quaternion(0.0924558, -1.18699e-07, 1.10216e-08, 0.995717)
-bones/101/rotation = Quaternion(-0.0924558, 1.18699e-07, -1.10216e-08, 0.995717)
-bones/103/rotation = Quaternion(-0.693526, -8.58822e-08, -8.26747e-08, 0.720432)
-bones/104/rotation = Quaternion(0.699991, 1.60739e-14, -5.80569e-15, 0.714152)
-bones/105/rotation = Quaternion(0.229497, 1.16028e-07, 2.73582e-08, 0.973309)
-bones/106/rotation = Quaternion(-0.109628, -1.18491e-07, -1.30686e-08, 0.993973)
-bones/106/scale = Vector3(1, 1, 1)
-bones/107/rotation = Quaternion(-0.111466, 1.18466e-07, -1.32878e-08, 0.993768)
-bones/108/rotation = Quaternion(-0.699991, -1.60739e-14, 5.80569e-15, 0.714152)
-bones/109/rotation = Quaternion(0.815783, 6.89457e-08, 9.72489e-08, 0.578359)
-bones/109/scale = Vector3(1, 1, 1)
-bones/110/rotation = Quaternion(-0.815783, -6.89457e-08, -9.72489e-08, 0.578359)
-bones/110/scale = Vector3(1, 1, 1)
-bones/111/rotation = Quaternion(0.707107, 8.42936e-08, 8.42937e-08, 0.707107)
-bones/111/scale = Vector3(1, 1, 1)
-bones/114/rotation = Quaternion(-2.98023e-07, 8.88179e-16, -7.21355e-14, 1)
-bones/115/rotation = Quaternion(-0.0569537, -1.19016e-07, -6.7894e-09, 0.998377)
-bones/118/rotation = Quaternion(-0.607777, -0.347396, -0.354639, 0.619803)
-bones/118/scale = Vector3(1, 1, 1)
-bones/119/rotation = Quaternion(-0.41259, 0.858332, -0.258332, 0.162176)
-bones/119/scale = Vector3(0.976016, 0.976015, 0.976016)
-bones/120/rotation = Quaternion(0.811563, -5.42386e-08, 6.02938e-08, 0.584264)
-bones/120/scale = Vector3(0.995505, 0.995505, 0.995505)
-bones/121/rotation = Quaternion(-0.407843, 0.0329286, -0.0168076, 0.912303)
-bones/121/scale = Vector3(1.0292, 1.0292, 1.0292)
-bones/124/scale = Vector3(1.0292, 1.0292, 1.0292)
-bones/126/rotation = Quaternion(-8.52844e-08, 0.0172165, 1.76758e-08, 0.999852)
-bones/126/scale = Vector3(1.0292, 1.0292, 1.0292)
-bones/127/rotation = Quaternion(-1.06171e-07, 0.000310402, 2.23517e-07, 1)
-bones/128/scale = Vector3(1.02457, 1.02457, 1.02457)
-bones/129/rotation = Quaternion(2.14423e-07, -0.17875, 1.69589e-08, 0.983895)
-bones/129/scale = Vector3(1.02457, 1.02457, 1.02457)
-bones/133/scale = Vector3(1, 1, 1)
-bones/134/rotation = Quaternion(0.386027, 0.695499, -0.490038, 0.356548)
-bones/135/rotation = Quaternion(0.192705, 7.77732e-09, -1.02176e-08, 0.981257)
-bones/136/rotation = Quaternion(-0.0202495, -0.000620612, -0.0306112, 0.999326)
-bones/136/scale = Vector3(1, 1, 1)
-bones/137/rotation = Quaternion(-1.3411e-07, 3.09199e-07, 2.88244e-07, 1)
-bones/138/rotation = Quaternion(0.0564366, 0.732928, -0.677933, -0.00629121)
-bones/139/rotation = Quaternion(-0.421646, 0.0138039, 0.00641978, 0.906633)
-bones/139/scale = Vector3(0.976015, 0.976015, 0.976015)
-bones/140/rotation = Quaternion(0.811563, -5.74702e-08, 6.52868e-08, 0.584264)
-bones/140/scale = Vector3(0.995505, 0.995505, 0.995505)
-bones/141/rotation = Quaternion(-0.468492, 0.778371, -0.132216, 0.39645)
-bones/141/scale = Vector3(1, 1, 1)
-bones/143/rotation = Quaternion(-0.468492, 0.778371, -0.132216, 0.39645)
-bones/143/scale = Vector3(1.01221, 0.976015, 1.01221)
-bones/144/rotation = Quaternion(-3.93055e-08, 0.104437, -1.89924e-09, 0.994531)
-bones/144/scale = Vector3(1, 1, 1)
-bones/145/rotation = Quaternion(0.798642, 0.105596, -0.144409, 0.574601)
-bones/145/scale = Vector3(1.00226, 0.963548, 1.03574)
-bones/146/rotation = Quaternion(2.12587e-07, 0.017527, -7.76764e-08, 0.999846)
-bones/147/rotation = Quaternion(-0.407427, 0.0163799, -0.0242184, 0.91277)
-bones/147/scale = Vector3(0.985859, 1.00528, 1.00995)
-bones/148/rotation = Quaternion(-0.607777, 0.347396, 0.354639, 0.619803)
-bones/148/scale = Vector3(1, 1, 1)
-bones/149/rotation = Quaternion(-0.41259, -0.858332, 0.258332, 0.162176)
-bones/149/scale = Vector3(0.976016, 0.976015, 0.976016)
-bones/150/rotation = Quaternion(0.811563, 5.42386e-08, -6.02938e-08, 0.584264)
-bones/150/scale = Vector3(0.995505, 0.995505, 0.995505)
-bones/151/rotation = Quaternion(-0.407843, -0.0329286, 0.0168076, 0.912303)
-bones/151/scale = Vector3(1.0292, 1.0292, 1.0292)
-bones/154/scale = Vector3(1.0292, 1.0292, 1.0292)
-bones/156/rotation = Quaternion(9.07446e-08, -0.0172164, -2.04458e-08, 0.999852)
-bones/156/scale = Vector3(1.0292, 1.0292, 1.0292)
-bones/157/rotation = Quaternion(-1.06171e-07, -0.000310402, -2.23517e-07, 1)
-bones/158/scale = Vector3(1.02457, 1.02457, 1.02457)
-bones/159/rotation = Quaternion(3.33602e-07, 0.17875, 1.07571e-08, 0.983895)
-bones/159/scale = Vector3(1.02457, 1.02457, 1.02457)
-bones/163/scale = Vector3(1, 1, 1)
-bones/164/rotation = Quaternion(-0.386027, 0.695499, -0.490038, -0.356548)
-bones/165/rotation = Quaternion(0.192705, -7.77732e-09, 1.02176e-08, 0.981257)
-bones/166/rotation = Quaternion(-0.0202495, 0.000620612, 0.0306112, 0.999326)
-bones/166/scale = Vector3(1, 1, 1)
-bones/167/rotation = Quaternion(-1.3411e-07, -3.09199e-07, -2.88244e-07, 1)
-bones/168/rotation = Quaternion(-0.0564366, 0.732928, -0.677933, 0.00629121)
-bones/169/rotation = Quaternion(-0.421646, -0.0138039, -0.00641978, 0.906633)
-bones/169/scale = Vector3(0.976015, 0.976015, 0.976015)
-bones/170/rotation = Quaternion(0.811563, 5.74702e-08, -6.52868e-08, 0.584264)
-bones/170/scale = Vector3(0.995505, 0.995505, 0.995505)
-bones/171/rotation = Quaternion(-0.468492, -0.778371, 0.132216, 0.39645)
-bones/171/scale = Vector3(1, 1, 1)
-bones/173/rotation = Quaternion(-0.468492, -0.778371, 0.132216, 0.39645)
-bones/173/scale = Vector3(1.01221, 0.976015, 1.01221)
-bones/174/rotation = Quaternion(-1.21486e-08, -0.104437, -2.05754e-08, 0.994532)
-bones/175/rotation = Quaternion(0.798642, -0.105596, 0.144409, 0.574601)
-bones/175/scale = Vector3(1.00226, 0.963548, 1.03574)
-bones/176/rotation = Quaternion(2.2423e-07, -0.017527, 8.04709e-08, 0.999846)
-bones/177/rotation = Quaternion(-0.407427, -0.0163799, 0.0242184, 0.91277)
-bones/177/scale = Vector3(0.98586, 1.00528, 1.00995)
-bones/178/rotation = Quaternion(-0.607777, -0.347396, -0.354639, 0.619803)
-bones/178/scale = Vector3(1, 1, 1)
-bones/179/rotation = Quaternion(-0.607777, 0.347396, 0.354639, 0.619803)
-bones/179/scale = Vector3(1, 1, 1)
-bones/182/position = Vector3(-0.265005, 3.1665e-08, -0.0406387)
-bones/182/rotation = Quaternion(0.0909222, 0.66691, -0.737911, -0.0495121)
-bones/182/scale = Vector3(1, 1, 1)
-bones/184/rotation = Quaternion(-0.707107, -5.28304e-09, -5.27275e-09, 0.707107)
-bones/185/rotation = Quaternion(0.966264, -1.05128e-08, -0.238719, -0.0966792)
-bones/185/scale = Vector3(1, 1, 0.999998)
-bones/187/position = Vector3(0.265005, 3.1665e-08, -0.0406387)
-bones/187/rotation = Quaternion(-0.0909221, 0.66691, -0.737911, 0.0495122)
-bones/187/scale = Vector3(1, 1, 1)
-bones/189/rotation = Quaternion(-0.707107, 5.28304e-09, 5.27275e-09, 0.707107)
-bones/190/rotation = Quaternion(0.966264, 1.05128e-08, 0.238719, -0.0966792)
-bones/190/scale = Vector3(1, 1, 0.999998)
-bones/199/rotation = Quaternion(0.961249, -3.28639e-08, 1.1459e-07, -0.275683)
-bones/199/scale = Vector3(1, 1, 0.999999)
-bones/200/position = Vector3(3.3131e-09, -2.79395e-09, 4.23446e-09)
-bones/201/rotation = Quaternion(0.961249, -3.2864e-08, 1.14589e-07, 0.275683)
-bones/201/scale = Vector3(1, 1, 0.999999)
-bones/202/rotation = Quaternion(8.52652e-14, 1.21169e-27, 1, 2.54111e-21)
-bones/203/position = Vector3(0.0733334, 0.139832, 0.214619)
-bones/203/rotation = Quaternion(-0.707107, 0, 0, 0.707107)
-bones/204/rotation = Quaternion(0.00540466, 0, 0, 0.999985)
-bones/213/rotation = Quaternion(0.961249, 3.28639e-08, -1.1459e-07, -0.275683)
-bones/213/scale = Vector3(1, 1, 0.999999)
-bones/214/position = Vector3(-3.3131e-09, -2.79395e-09, 4.23446e-09)
-bones/215/rotation = Quaternion(0.961249, 3.28639e-08, -1.1459e-07, 0.275683)
-bones/215/scale = Vector3(1, 1, 0.999999)
-bones/216/rotation = Quaternion(-8.52652e-14, 1.21169e-27, 1, -2.54111e-21)
-bones/217/position = Vector3(-0.0733334, 0.139832, 0.214619)
-bones/217/rotation = Quaternion(-0.707107, 0, 0, 0.707107)
-bones/218/rotation = Quaternion(0.00540466, 0, 0, 0.999985)
-
-[node name="nail-blade" parent="base/rig/Skeleton3D" index="0"]
-transform = Transform3D(0.668384, -1.58392e-07, 0.743816, 0.743816, 7.9704e-09, -0.668384, 9.99383e-08, 1, 1.23142e-07, -0.291155, 0.739636, -0.242499)
-
-[node name="nail-handle" parent="base/rig/Skeleton3D" index="1"]
-transform = Transform3D(0.668384, -1.58392e-07, 0.743816, 0.743816, 7.9704e-09, -0.668384, 9.99383e-08, 1, 1.23142e-07, -0.291155, 0.739636, -0.242499)
+bones/5/rotation = Quaternion(-0.109628, -1.18491e-07, -1.30686e-08, 0.993973)
+bones/6/rotation = Quaternion(-0.111466, 1.18466e-07, -1.32878e-08, 0.993768)
+bones/7/rotation = Quaternion(-0.707107, 7.85046e-17, 7.85046e-17, 0.707107)
+bones/8/position = Vector3(4.53321e-09, 0.292604, -0.03312)
+bones/8/rotation = Quaternion(-0.0952461, -0.736157, -0.422428, 0.52015)
+bones/8/scale = Vector3(1, 1, 1)
+bones/9/position = Vector3(5.016e-09, 0.292604, -0.03312)
+bones/9/rotation = Quaternion(-0.0952461, 0.736157, 0.422428, 0.52015)
+bones/9/scale = Vector3(1, 1, 1)
+bones/10/position = Vector3(0.0733334, 0.262039, -0.00743999)
+bones/10/rotation = Quaternion(0.998928, -7.0842e-08, 1.2262e-07, 0.0462933)
+bones/10/scale = Vector3(1, 1, 1)
+bones/11/rotation = Quaternion(-1.49011e-08, 1.19352e-07, -7.64426e-08, 1)
+bones/12/rotation = Quaternion(0.119238, -1.18216e-07, 6.03186e-08, 0.992866)
+bones/12/scale = Vector3(1, 1, 1)
+bones/13/rotation = Quaternion(1.11759e-08, 6.38114e-08, -1.74988e-08, 1)
+bones/14/rotation = Quaternion(-0.547448, -1.07996e-07, -2.47164e-07, 0.83684)
+bones/14/scale = Vector3(1, 1, 1)
+bones/15/rotation = Quaternion(-5.94909e-08, 0.961249, -0.275682, 1.41077e-07)
+bones/15/scale = Vector3(1, 1, 1)
+bones/16/position = Vector3(-0.0733334, 0.262039, -0.00743998)
+bones/16/rotation = Quaternion(0.998928, 5.62744e-08, -1.21945e-07, 0.0462933)
+bones/16/scale = Vector3(1, 1, 1)
+bones/17/rotation = Quaternion(-1.11759e-08, -1.19575e-07, 6.18592e-08, 1)
+bones/18/rotation = Quaternion(0.119238, 1.18438e-07, -6.03452e-08, 0.992866)
+bones/18/scale = Vector3(1, 1, 1)
+bones/19/rotation = Quaternion(1.86264e-08, -6.38114e-08, 1.74988e-08, 1)
+bones/20/rotation = Quaternion(-0.547448, 1.07996e-07, 2.47164e-07, 0.83684)
+bones/20/scale = Vector3(1, 1, 1)
+bones/21/rotation = Quaternion(5.94909e-08, 0.961249, -0.275682, -1.41077e-07)
+bones/21/scale = Vector3(1, 1, 1)
+bones/22/position = Vector3(0.01098, 0.550924, 0.04104)
+bones/22/rotation = Quaternion(-0.613952, -0.35093, -0.351142, 0.613685)
+bones/22/scale = Vector3(1, 1, 1)
+bones/23/position = Vector3(0.11718, 0.540641, 0.0188245)
+bones/23/rotation = Quaternion(-0.211191, 0.421882, -0.86264, 0.182391)
+bones/23/scale = Vector3(1.01221, 0.976015, 1.01221)
+bones/24/rotation = Quaternion(-3.93055e-08, 0.104437, -1.89924e-09, 0.994531)
+bones/25/rotation = Quaternion(0.798642, 0.105596, -0.144409, 0.574601)
+bones/25/scale = Vector3(1.00226, 0.963548, 1.03574)
+bones/26/rotation = Quaternion(2.12587e-07, 0.017527, -7.76764e-08, 0.999846)
+bones/27/rotation = Quaternion(-0.407427, 0.0163799, -0.0242184, 0.91277)
+bones/27/scale = Vector3(0.985859, 1.00528, 1.00995)
+bones/28/position = Vector3(-0.01098, 0.550924, 0.04104)
+bones/28/rotation = Quaternion(-0.613952, 0.35093, 0.351142, 0.613685)
+bones/28/scale = Vector3(1, 1, 1)
+bones/29/position = Vector3(-0.11718, 0.540641, 0.0188245)
+bones/29/rotation = Quaternion(-0.211191, -0.421882, 0.86264, 0.182391)
+bones/29/scale = Vector3(1.01221, 0.976015, 1.01221)
+bones/30/rotation = Quaternion(-1.21486e-08, -0.104437, -2.05754e-08, 0.994532)
+bones/31/rotation = Quaternion(0.798642, -0.105596, 0.144409, 0.574601)
+bones/31/scale = Vector3(1.00226, 0.963548, 1.03574)
+bones/32/rotation = Quaternion(2.2423e-07, -0.017527, 8.04709e-08, 0.999846)
+bones/33/rotation = Quaternion(-0.407427, -0.0163799, 0.0242184, 0.91277)
+bones/33/scale = Vector3(0.98586, 1.00528, 1.00995)
+bones/34/position = Vector3(0.115146, 0.381299, 0.00532452)
+bones/34/rotation = Quaternion(-0.0012814, 0.0528379, 0.998309, -0.0242099)
+bones/34/scale = Vector3(0.00802934, 0.00802934, 0.00802934)
 
 [node name="AnimationTree" type="AnimationTree" parent="." index="2"]
 tree_root = SubResource("AnimationNodeBlendTree_xdiqd")
 anim_player = NodePath("../AnimationPlayer")
-parameters/forward/blend_position = 0.0
-parameters/movement/current_state = "forward"
+parameters/TimeScale/scale = 4.0
+parameters/attack/active = false
+parameters/attack/internal_active = false
+parameters/attack/request = 0
+parameters/move/blend_position = 0.0
+parameters/movement/current_state = "move"
 parameters/movement/transition_request = ""
 parameters/movement/current_index = 0
index 129640632081c22a849a7c2385920d2c7c350d44..feacc9ded643be0f774efec4d27d1ff1f4a287f5 100644 (file)
@@ -1,21 +1,21 @@
-extends Node3D
+class_name KnightSkin extends Node3D
 
 
 @onready var animation_tree: AnimationTree = $AnimationTree
 
 
-func forward(speed: float) -> void:
-       animation_tree.set("parameters/movement/transition_request", "forward")
-       animation_tree.set("parameters/forward/blend_position", speed)
+func move(speed: float) -> void:
+       animation_tree.set("parameters/movement/transition_request", "move")
+       animation_tree.set("parameters/move/blend_position", speed)
 
 
-func idle() -> void:
-       animation_tree.set("parameters/movement/transition_request", "idle")
+func jump() -> void:
+       animation_tree.set("parameters/movement/transition_request", "jump")
 
 
 func fall() -> void:
-       animation_tree.set("parameters/movement/transition_request", "fall")
+       animation_tree.set("parameters/movement/transition_request", "jump")
 
 
 func attack() -> void:
-       animation_tree.set("parameters/movement/transition_request", "attack")
+       animation_tree.set("parameters/attack/request", 1)