Move files and folders to new repo format to enable multi-project format

This commit is contained in:
2025-03-06 22:07:25 -08:00
parent 12cbb82ac9
commit a09f6ec5a5
3973 changed files with 1781 additions and 2938 deletions

View File

@@ -0,0 +1,11 @@
using Godot;
namespace Zennysoft.Game.Ma;
public partial class FpsCounter : Label
{
public override void _Process(double delta)
{
this.Text = Engine.GetFramesPerSecond().ToString();
}
}

View File

@@ -0,0 +1 @@
uid://dj6oqler47dqf

View File

@@ -0,0 +1,6 @@
using Godot;
namespace Zennysoft.Game.Ma;
[InputMap]
public partial class GameInputs;

View File

@@ -0,0 +1 @@
uid://b2ff347q41vpq

View File

@@ -0,0 +1,39 @@
using Godot;
namespace Zennysoft.Game.Ma;
/// <summary>
/// Utility class that loads and instantiates scenes.
/// </summary>
public interface IInstantiator
{
/// <summary>Scene tree.</summary>
public SceneTree SceneTree { get; }
/// <summary>
/// Loads and instantiates the given scene.
/// </summary>
/// <param name="path">Path to the scene.</param>
/// <typeparam name="T">Type of the scene's root.</typeparam>
/// <returns>Instance of the scene.</returns>
T LoadAndInstantiate<T>(string path) where T : Node;
}
/// <summary>
/// Utility class that loads and instantiates scenes.
/// </summary>
public class Instantiator : IInstantiator
{
public SceneTree SceneTree { get; }
public Instantiator(SceneTree sceneTree)
{
SceneTree = sceneTree;
}
public T LoadAndInstantiate<T>(string path) where T : Node
{
var scene = GD.Load<PackedScene>(path);
return scene.Instantiate<T>();
}
}

View File

@@ -0,0 +1 @@
uid://lg0ofgq38m5j