Pong/Scripts/Managers/SceneManager.cs
Fries 9b0ebcefba walls can reset the ball to its starting position
WallManager binds to the BodyEntered signal on the Area2D class and
detects if the body that entered the area is the ball class, and if it
is, it will reset the ball to its starting position. right now, theres
no scoring system. this will be added later.
2023-05-19 00:18:38 -07:00

14 lines
238 B
C#

using Godot;
namespace Pong.Scripts.Managers;
public partial class SceneManager : Node2D
{
public override void _Process(double delta)
{
if (Input.IsActionJustPressed("scene_reload"))
{
GetTree().ReloadCurrentScene();
}
}
}