Adjusted moving values and animations to make vesna not slide any more

pull/14/head
kziolkowski 5 months ago
parent 8e0dced918
commit 0008b16d48

@ -745,7 +745,7 @@ animations = [{
}],
"loop": true,
"name": &"back walking",
"speed": 15.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -825,7 +825,7 @@ animations = [{
}],
"loop": true,
"name": &"back walking backpack",
"speed": 25.0
"speed": 45.0
}, {
"frames": [{
"duration": 1.0,
@ -863,7 +863,7 @@ animations = [{
}],
"loop": true,
"name": &"back walking rake",
"speed": 5.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -901,7 +901,7 @@ animations = [{
}],
"loop": true,
"name": &"back walking wateringcan",
"speed": 15.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -1472,7 +1472,7 @@ animations = [{
}],
"loop": true,
"name": &"front walking",
"speed": 15.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -1552,7 +1552,7 @@ animations = [{
}],
"loop": true,
"name": &"front walking backpack",
"speed": 25.0
"speed": 42.0
}, {
"frames": [{
"duration": 1.0,
@ -1590,7 +1590,7 @@ animations = [{
}],
"loop": true,
"name": &"front walking rake",
"speed": 15.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -1628,7 +1628,7 @@ animations = [{
}],
"loop": true,
"name": &"front walking wateringcan",
"speed": 15.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -1949,7 +1949,7 @@ animations = [{
}],
"loop": true,
"name": &"side walking",
"speed": 25.0
"speed": 38.0
}, {
"frames": [{
"duration": 1.0,
@ -1987,7 +1987,7 @@ animations = [{
}],
"loop": true,
"name": &"side walking rake",
"speed": 15.0
"speed": 16.0
}, {
"frames": [{
"duration": 1.0,
@ -2025,7 +2025,7 @@ animations = [{
}],
"loop": true,
"name": &"side walking simplified",
"speed": 15.0
"speed": 16.0
}, {
"frames": [{
"duration": 1.0,
@ -2063,23 +2063,24 @@ animations = [{
}],
"loop": true,
"name": &"side walking wateringcan",
"speed": 11.0
"speed": 16.0
}]
[node name="Vesna" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d")]
[node name="Vesna" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d", "_vesnaAnimations")]
y_sort_enabled = true
script = ExtResource("1_yd5ep")
_farmingControls = NodePath("FarmingControls")
_player2d = NodePath("CharacterBody2D")
_vesnaAnimations = NodePath("CharacterBody2D/visuals/Animated Sprites")
[node name="CharacterBody2D" type="CharacterBody2D" parent="." groups=["PlantGrowing"]]
position = Vector2(0, 374)
collision_layer = 4
collision_mask = 3
script = ExtResource("2_1vqmv")
_speed = 1500.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
visible = false
z_index = 1
y_sort_enabled = true
position = Vector2(-24, -13)
@ -2095,7 +2096,8 @@ _wateringParticles = NodePath("../../pouring water vfx")
[node name="Animated Sprites" type="AnimatedSprite2D" parent="CharacterBody2D/visuals"]
position = Vector2(0, 450)
sprite_frames = SubResource("SpriteFrames_4yiyq")
animation = &"front walking backpack"
animation = &"side walking wateringcan"
frame_progress = 0.130831
offset = Vector2(0, -450)
[node name="Hoe" type="Sprite2D" parent="CharacterBody2D/visuals"]

@ -53,6 +53,11 @@ public partial class PlayerMovement : CharacterBody2D
if (anyActionPressed)
{
if (currentVelocity.X != 0 && currentVelocity.Y != 0)
{
currentVelocity *= 0.7f;
}
Velocity = currentVelocity;
MoveAndSlide();
}

Loading…
Cancel
Save