Pong/Scripts/Managers/PongSceneManager.cs

15 lines
294 B
C#
Raw Permalink Normal View History

namespace Pong.Scripts.Managers;
public partial class PongSceneManager : Node2D
{
private readonly StringName _reloadAction = new("scene_reload");
public override void _Process(double delta)
{
if (Input.IsActionJustPressed(_reloadAction))
{
GetTree().ReloadCurrentScene();
}
}
}