Adjusted moving values and animations to make vesna not slide any more
This commit is contained in:
@@ -745,7 +745,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"back walking",
|
"name": &"back walking",
|
||||||
"speed": 15.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -825,7 +825,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"back walking backpack",
|
"name": &"back walking backpack",
|
||||||
"speed": 25.0
|
"speed": 45.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -863,7 +863,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"back walking rake",
|
"name": &"back walking rake",
|
||||||
"speed": 5.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -901,7 +901,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"back walking wateringcan",
|
"name": &"back walking wateringcan",
|
||||||
"speed": 15.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -1472,7 +1472,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"front walking",
|
"name": &"front walking",
|
||||||
"speed": 15.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -1552,7 +1552,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"front walking backpack",
|
"name": &"front walking backpack",
|
||||||
"speed": 25.0
|
"speed": 42.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -1590,7 +1590,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"front walking rake",
|
"name": &"front walking rake",
|
||||||
"speed": 15.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -1628,7 +1628,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"front walking wateringcan",
|
"name": &"front walking wateringcan",
|
||||||
"speed": 15.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -1949,7 +1949,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"side walking",
|
"name": &"side walking",
|
||||||
"speed": 25.0
|
"speed": 38.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -1987,7 +1987,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"side walking rake",
|
"name": &"side walking rake",
|
||||||
"speed": 15.0
|
"speed": 16.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -2025,7 +2025,7 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"side walking simplified",
|
"name": &"side walking simplified",
|
||||||
"speed": 15.0
|
"speed": 16.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@@ -2063,23 +2063,24 @@ animations = [{
|
|||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"side walking wateringcan",
|
"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
|
y_sort_enabled = true
|
||||||
script = ExtResource("1_yd5ep")
|
script = ExtResource("1_yd5ep")
|
||||||
_farmingControls = NodePath("FarmingControls")
|
_farmingControls = NodePath("FarmingControls")
|
||||||
_player2d = NodePath("CharacterBody2D")
|
_player2d = NodePath("CharacterBody2D")
|
||||||
|
_vesnaAnimations = NodePath("CharacterBody2D/visuals/Animated Sprites")
|
||||||
|
|
||||||
[node name="CharacterBody2D" type="CharacterBody2D" parent="." groups=["PlantGrowing"]]
|
[node name="CharacterBody2D" type="CharacterBody2D" parent="." groups=["PlantGrowing"]]
|
||||||
position = Vector2(0, 374)
|
position = Vector2(0, 374)
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
script = ExtResource("2_1vqmv")
|
script = ExtResource("2_1vqmv")
|
||||||
_speed = 1500.0
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||||
|
visible = false
|
||||||
z_index = 1
|
z_index = 1
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
position = Vector2(-24, -13)
|
position = Vector2(-24, -13)
|
||||||
@@ -2095,7 +2096,8 @@ _wateringParticles = NodePath("../../pouring water vfx")
|
|||||||
[node name="Animated Sprites" type="AnimatedSprite2D" parent="CharacterBody2D/visuals"]
|
[node name="Animated Sprites" type="AnimatedSprite2D" parent="CharacterBody2D/visuals"]
|
||||||
position = Vector2(0, 450)
|
position = Vector2(0, 450)
|
||||||
sprite_frames = SubResource("SpriteFrames_4yiyq")
|
sprite_frames = SubResource("SpriteFrames_4yiyq")
|
||||||
animation = &"front walking backpack"
|
animation = &"side walking wateringcan"
|
||||||
|
frame_progress = 0.130831
|
||||||
offset = Vector2(0, -450)
|
offset = Vector2(0, -450)
|
||||||
|
|
||||||
[node name="Hoe" type="Sprite2D" parent="CharacterBody2D/visuals"]
|
[node name="Hoe" type="Sprite2D" parent="CharacterBody2D/visuals"]
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ public partial class PlayerMovement : CharacterBody2D
|
|||||||
|
|
||||||
if (anyActionPressed)
|
if (anyActionPressed)
|
||||||
{
|
{
|
||||||
|
if (currentVelocity.X != 0 && currentVelocity.Y != 0)
|
||||||
|
{
|
||||||
|
currentVelocity *= 0.7f;
|
||||||
|
}
|
||||||
|
|
||||||
Velocity = currentVelocity;
|
Velocity = currentVelocity;
|
||||||
MoveAndSlide();
|
MoveAndSlide();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user