Add a slow walk

This commit is contained in:
Lucas Peter 2024-07-23 12:15:28 +02:00
parent f2439240f3
commit 0d568d9359
No known key found for this signature in database
5 changed files with 44 additions and 27 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://0m1hk2nu4bps"]
[gd_scene load_steps=23 format=3 uid="uid://0m1hk2nu4bps"]
[ext_resource type="Script" path="res://player.gd" id="1_0pgv8"]
[ext_resource type="Texture2D" uid="uid://5pmqr3y62guu" path="res://player/currentCloth.tres" id="2_45h8h"]
@ -464,6 +464,19 @@ nodes/TimeScale/position = Vector2(140, 120)
nodes/output/position = Vector2(280, 120)
node_connections = [&"TimeScale", 0, &"Animation", &"output", 0, &"TimeScale"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3ity4"]
animation = &"Walk"
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_lyqpn"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_5jdm6"]
graph_offset = Vector2(-329, 172)
nodes/Animation/node = SubResource("AnimationNodeAnimation_3ity4")
nodes/Animation/position = Vector2(-120, 220)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_lyqpn")
nodes/TimeScale/position = Vector2(60, 220)
node_connections = [&"TimeScale", 0, &"Animation", &"output", 0, &"TimeScale"]
[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_c82tj"]
blend_point_0/node = SubResource("AnimationNodeAnimation_paj7q")
blend_point_0/pos = 0.0
@ -471,6 +484,8 @@ blend_point_1/node = SubResource("AnimationNodeAnimation_w0twr")
blend_point_1/pos = 500.0
blend_point_2/node = SubResource("AnimationNodeBlendTree_p4347")
blend_point_2/pos = 700.0
blend_point_3/node = SubResource("AnimationNodeBlendTree_5jdm6")
blend_point_3/pos = 20.0
min_space = 0.0
max_space = 700.0
snap = 10.0
@ -478,6 +493,7 @@ value_label = "speed"
sync = true
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_wgp38"]
graph_offset = Vector2(-108, 70)
nodes/WalkRun/node = SubResource("AnimationNodeBlendSpace1D_c82tj")
nodes/WalkRun/position = Vector2(180, 120)
nodes/output/position = Vector2(440, 120)
@ -514,30 +530,32 @@ playback_default_blend_time = 0.3
[node name="AnimationTree" type="AnimationTree" parent="." groups=["Animation"]]
tree_root = SubResource("AnimationNodeBlendTree_wgp38")
anim_player = NodePath("../AnimationPlayer")
parameters/WalkRun/blend_position = 178.271
parameters/WalkRun/blend_position = 20.1713
parameters/WalkRun/2/TimeScale/scale = 1.8
parameters/WalkRun/3/TimeScale/scale = 0.3
[node name="Skeleton2D" type="Skeleton2D" parent="."]
position = Vector2(17, 0)
[node name="BootL" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(-5.61248, -38.9448)
rotation = 0.142016
region_enabled = true
region_rect = Rect2(896, 768, 128, 128)
metadata/Type = "Skin"
[node name="BootR" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(-31.9509, -45.6022)
rotation = -0.232808
position = Vector2(-77.0483, -35.8612)
rotation = 0.298037
scale = Vector2(1, 1)
texture = ExtResource("2_45h8h")
region_enabled = true
region_rect = Rect2(896, 768, 128, 128)
metadata/Type = "Skin"
[node name="BootR" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(26.6367, -42.0048)
rotation = -0.528737
texture = ExtResource("2_45h8h")
region_enabled = true
region_rect = Rect2(896, 768, 128, 128)
metadata/Type = "Skin"
[node name="Body" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(51, -229.397)
position = Vector2(51, -242.284)
texture = ExtResource("2_45h8h")
offset = Vector2(-15, 0)
region_enabled = true
@ -545,7 +563,7 @@ region_rect = Rect2(0, 640, 384, 384)
metadata/Type = "Skin"
[node name="HandL" type="Sprite2D" parent="Skeleton2D/Body"]
position = Vector2(-20.1603, 51.5819)
position = Vector2(-3, 54)
texture = ExtResource("2_45h8h")
region_enabled = true
region_rect = Rect2(768, 768, 128, 128)
@ -553,7 +571,7 @@ metadata/Type = "Skin"
[node name="HandR" type="Sprite2D" parent="Skeleton2D/Body"]
show_behind_parent = true
position = Vector2(-154.264, 30.3642)
position = Vector2(-160, 29)
texture = ExtResource("2_45h8h")
region_enabled = true
region_rect = Rect2(768, 768, 128, 128)
@ -561,9 +579,8 @@ metadata/Type = "Skin"
[node name="Tail" type="Sprite2D" parent="Skeleton2D/Body"]
show_behind_parent = true
position = Vector2(44, 99.3973)
rotation = -0.090184
scale = Vector2(1, 1)
position = Vector2(44, 112.284)
rotation = 0.153589
texture = ExtResource("2_45h8h")
offset = Vector2(70, 0)
region_enabled = true
@ -571,8 +588,8 @@ region_rect = Rect2(768, 640, 256, 128)
metadata/Type = "Skin"
[node name="Head" type="Sprite2D" parent="Skeleton2D"]
position = Vector2(-40, -402.397)
rotation = 0.0243178
position = Vector2(-40, -415.284)
rotation = 0.0557601
texture = ExtResource("2_45h8h")
offset = Vector2(0, -168)
region_enabled = true

BIN
player/animations/Walk.res (Stored with Git LFS)

Binary file not shown.

BIN
player/animations/WalkLeft.res (Stored with Git LFS)

Binary file not shown.

BIN
player/animations/WalkRight.res (Stored with Git LFS)

Binary file not shown.

BIN
player/animations/idle.res (Stored with Git LFS)

Binary file not shown.