using Sandbox;
public sealed class SceneLoader : Component
{
[Property] public string ScenePath { get; set; } = "scenes/gameplay.scene";
[Property] public float Delay { get; set; } = 5f;
private float _timer = 0f;
protected override void OnUpdate()
{
_timer += Time.Delta;
if ( _timer >= Delay )
Game.ActiveScene.LoadFromFile( ScenePath );
}
}