cirnogodot/Scripts/Utils/GlobalInputManager.cs

19 lines
427 B
C#
Raw Permalink Normal View History

using Godot;
namespace Cirno.Scripts.Utils;
public partial class GlobalInputManager : Node
{
public static GlobalInputManager Instance;
[Export] public StringName PauseActionName { get; private set; } = "pause";
public static bool IsPauseJustPressed()
{
return Input.IsActionJustPressed(Instance.PauseActionName);
}
public override void _Ready()
{
Instance = this;
}
}