source generator
This commit is contained in:
@@ -19,5 +19,5 @@ public class CreatureControl
|
||||
{
|
||||
}
|
||||
|
||||
public IBaseCharacter? CurrentCharacter { get; set; }
|
||||
public IPlayerCharacter? CurrentCharacter { get; set; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
11
src/GlobalManagement/Providers/ITextureProvider.cs
Normal file
11
src/GlobalManagement/Providers/ITextureProvider.cs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user