Pong/Scripts/Managers/PongSceneManager.cs
Fries 8ab2f09e62 optimize memory allocations
i made the allocations of objects go down a lot. which is cool :3!
2023-05-21 18:19:05 -07:00

16 lines
308 B
C#

using Godot;
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();
}
}
}