Vesna can walk diagonally now

This commit is contained in:
2025-08-02 15:08:38 +02:00
parent 2e21fb7e98
commit 8e0dced918
10 changed files with 151 additions and 67 deletions
@@ -0,0 +1,37 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Services;
public partial class InputService : Node
{
public static InputService Instance { get; private set; } = null!;
[Signal]
public delegate void InputEnabledChangedEventHandler(bool enabled);
private static bool _inputEnabled = true;
public bool InputEnabled
{
get => _inputEnabled;
set
{
if (_inputEnabled != value)
{
CallDeferred(nameof(SetInputEnabled), value);
}
}
}
private void SetInputEnabled(bool enabled)
{
_inputEnabled = enabled;
EmitSignal(SignalName.InputEnabledChanged, _inputEnabled);
}
public override void _EnterTree()
{
Instance = this;
}
}
@@ -0,0 +1 @@
uid://blmbgmdv4aui8