24 lines
513 B
C#
24 lines
513 B
C#
using Godot;
|
|
|
|
namespace SideScrollerGame.Debug;
|
|
|
|
public partial class SmokeSceneController : Node2D
|
|
{
|
|
public override async void _Ready()
|
|
{
|
|
GD.Print("Smoke scene loaded");
|
|
|
|
if (!IsHeadless())
|
|
{
|
|
return;
|
|
}
|
|
|
|
await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
|
|
GetTree().Quit(0);
|
|
}
|
|
|
|
private static bool IsHeadless()
|
|
{
|
|
return DisplayServer.GetName().Equals("headless", System.StringComparison.OrdinalIgnoreCase);
|
|
}
|
|
} |