source generator

This commit is contained in:
h z
2024-07-10 07:02:11 +01:00
parent e1a74ad614
commit 5c6e3031d5
35 changed files with 169 additions and 34 deletions

View File

@@ -19,5 +19,5 @@ public class CreatureControl
{
}
public IBaseCharacter? CurrentCharacter { get; set; }
public IPlayerCharacter? CurrentCharacter { get; set; }
}

View File

@@ -1,4 +1,5 @@
using Nocturnis.Enigmos.Modules;
using Nocturnis.GlobalManagement.Providers;
namespace Nocturnis.GlobalManagement.Controls;
@@ -23,11 +24,14 @@ public class EnigmosControl
public void ShutDownEngine()
{
EngineUp = false;
}
public void PowerUpEngine()
{
EngineUp = true;
}
public double Energy { get; set; } = 0d;
public bool EngineUp { get; private set; }
}

View File

@@ -1,3 +1,5 @@
using Godot;
namespace Nocturnis.GlobalManagement.Providers;
public static class GlobalProvider
@@ -8,4 +10,19 @@ public static class GlobalProvider
public static ISceneProvider? SceneProvider { get; set; }
public static IPolymorphismProvider? PolymorphismProvider { get; set; }
public static IDataPackageTypeProvider? DataPackageTypeProvider { get; set; }
public static ITextureProvider? TextureProvider { get; set; }
public static readonly Dictionary<StringName, PackedScene> AssetNameMapper = new();
public static class ItemIconMapper<W>
{
public static Texture2D? Texture { get; set; }
}
public static class AssetMapper<T>
{
public static PackedScene Scene { get; set; }
}
public static Font Font { get; set; }
}

View File

@@ -1,10 +1,8 @@
using Godot;
using Nocturnis.Scenes;
namespace Nocturnis.GlobalManagement.Providers;
public interface ISceneProvider
{
IRootScene RootScene { get; set; }
PackedScene AssetMapper<T>();
}
IRootScene? RootScene { get; set; }
}

View File

@@ -0,0 +1,11 @@
using Godot;
using Nocturnis.Enigmos.Modules;
using Nocturnis.Inventories.Items;
namespace Nocturnis.GlobalManagement.Providers;
public interface ITextureProvider
{
Texture2D ModuleTextureMapper(IBaseModule module);
Texture2D ItemTextureMapper(IBaseItem item);
}