Add Godot project shell
This commit is contained in:
24
godot/scripts/debug/SmokeSceneController.cs
Normal file
24
godot/scripts/debug/SmokeSceneController.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user