Vesna can walk diagonally now
This commit is contained in:
@@ -35,7 +35,7 @@ public partial class PlantBehaviour2D : Node2D
|
||||
if (_field.FieldState != FieldState.Watered || _magicWordSaid != _magicWordNeeded)
|
||||
return;
|
||||
|
||||
GetTree().CallGroup("PlantGrowing", Player2D.MethodName.PlayFarmingAnimation);
|
||||
//GetTree().CallGroup("PlantGrowing", PlayerMovement.MethodName.PlayFarmingAnimation);
|
||||
// todo:
|
||||
// find out why the last plant stage is being skipped the second time around
|
||||
switch (_state)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Babushka.scripts.CSharp.Common.Animation;
|
||||
using Babushka.scripts.CSharp.Common.CharacterControls;
|
||||
using Babushka.scripts.CSharp.Common.Inventory;
|
||||
using Babushka.scripts.CSharp.Common.Services;
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Farming;
|
||||
@@ -9,7 +11,8 @@ public partial class VesnaBehaviour2D : Node
|
||||
[ExportGroup("Farming")]
|
||||
[Export] private FieldService2D _fieldParent;
|
||||
[Export] private FarmingControls2D _farmingControls;
|
||||
[Export] private Player2D _player2d;
|
||||
[Export] private PlayerMovement _player2d;
|
||||
[Export] private VesnaAnimations _vesnaAnimations;
|
||||
[Export] private ItemResource _hoe;
|
||||
[Export] private ItemResource _wateringCan;
|
||||
|
||||
@@ -77,7 +80,7 @@ public partial class VesnaBehaviour2D : Node
|
||||
if (toolId == 1)
|
||||
{
|
||||
_farmingControls.FillWateringCan();
|
||||
_player2d.PlayWateringCanFillupAnimation();
|
||||
_vesnaAnimations.PlayWateringCanFillupAnimation();
|
||||
EmitSignal(SignalName.FilledWateringCan);
|
||||
}
|
||||
}
|
||||
@@ -85,18 +88,18 @@ public partial class VesnaBehaviour2D : Node
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Enables the character movement in the Player2D script.
|
||||
/// Enables the input.
|
||||
/// </summary>
|
||||
public void EnableMovement()
|
||||
{
|
||||
_player2d.InputEnabled = true;
|
||||
InputService.Instance.InputEnabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disables the character movement in the Player2D script.
|
||||
/// Disables the input.
|
||||
/// </summary>
|
||||
public void DisableMovement()
|
||||
{
|
||||
_player2d.InputEnabled = false;
|
||||
InputService.Instance.InputEnabled = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user