Move App logic to other projects
This commit is contained in:
22
Zennysoft.Game.Abstractions/App/IAppRepo.cs
Normal file
22
Zennysoft.Game.Abstractions/App/IAppRepo.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public interface IAppRepo : IDisposable
|
||||||
|
{
|
||||||
|
event Action? GameEntered;
|
||||||
|
|
||||||
|
event Action? GameExited;
|
||||||
|
|
||||||
|
event Action? SplashScreenSkipped;
|
||||||
|
|
||||||
|
event Action? MainMenuEntered;
|
||||||
|
|
||||||
|
void SkipSplashScreen();
|
||||||
|
|
||||||
|
void OnMainMenuEntered();
|
||||||
|
|
||||||
|
void OnEnterGame();
|
||||||
|
|
||||||
|
void OnExitGame();
|
||||||
|
|
||||||
|
void OnGameOver();
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Zennysoft.Game.Ma.src.enemy;
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
public interface ICanPatrol
|
public interface ICanPatrol
|
||||||
{
|
{
|
||||||
@@ -1,27 +1,6 @@
|
|||||||
using System;
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public interface IAppRepo : IDisposable
|
|
||||||
{
|
|
||||||
event Action? GameEntered;
|
|
||||||
|
|
||||||
event Action? GameExited;
|
|
||||||
|
|
||||||
event Action? SplashScreenSkipped;
|
|
||||||
|
|
||||||
event Action? MainMenuEntered;
|
|
||||||
|
|
||||||
void SkipSplashScreen();
|
|
||||||
|
|
||||||
void OnMainMenuEntered();
|
|
||||||
|
|
||||||
void OnEnterGame();
|
|
||||||
|
|
||||||
void OnExitGame();
|
|
||||||
|
|
||||||
void OnGameOver();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class AppRepo : IAppRepo
|
public class AppRepo : IAppRepo
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
public record Data
|
public record Data
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public interface IAppLogic : ILogicBlock<AppLogic.State>;
|
public interface IAppLogic : ILogicBlock<AppLogic.State>;
|
||||||
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.LogicBlocks;
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
public partial class AppLogic
|
public partial class AppLogic
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum AccessoryTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
HalfVTConsumption,
|
||||||
|
StatusEffectImmunity
|
||||||
|
}
|
||||||
6
Zennysoft.Game.Ma.Implementation/Item/Tags/BoxItemTag.cs
Normal file
6
Zennysoft.Game.Ma.Implementation/Item/Tags/BoxItemTag.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum BoxItemTag
|
||||||
|
{
|
||||||
|
RandomNewItem,
|
||||||
|
}
|
||||||
11
Zennysoft.Game.Ma.Implementation/Item/Tags/ElementType.cs
Normal file
11
Zennysoft.Game.Ma.Implementation/Item/Tags/ElementType.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum ElementType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Aeolic,
|
||||||
|
Telluric,
|
||||||
|
Hydric,
|
||||||
|
Igneous,
|
||||||
|
Ferrum
|
||||||
|
}
|
||||||
7
Zennysoft.Game.Ma.Implementation/Item/Tags/ItemTag.cs
Normal file
7
Zennysoft.Game.Ma.Implementation/Item/Tags/ItemTag.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum ItemTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
BreaksOnChange
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum ThrowableItemTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
LowerTargetTo1HP,
|
||||||
|
CanChangeAffinity,
|
||||||
|
TeleportToRandomLocation,
|
||||||
|
WarpToExitIfFound
|
||||||
|
}
|
||||||
20
Zennysoft.Game.Ma.Implementation/Item/Tags/UsableItemTag.cs
Normal file
20
Zennysoft.Game.Ma.Implementation/Item/Tags/UsableItemTag.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum UsableItemTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
DoubleEXP,
|
||||||
|
IdentifyAllItemsCostHP,
|
||||||
|
BriefImmunity,
|
||||||
|
SwapHPAndVT,
|
||||||
|
TeleportAllEnemiesToRoom,
|
||||||
|
TurnAllEnemiesIntoHealingItem,
|
||||||
|
KillHalfEnemiesInRoom,
|
||||||
|
AbsorbHPFromAllEnemiesInRoom,
|
||||||
|
HealsAllInRoomToMaxHP,
|
||||||
|
DealElementalDamageToAllEnemiesInRoom,
|
||||||
|
RaiseCurrentWeaponAttack,
|
||||||
|
RaiseCurrentDefenseArmor,
|
||||||
|
RaiseLevel,
|
||||||
|
RandomEffect,
|
||||||
|
}
|
||||||
9
Zennysoft.Game.Ma.Implementation/Item/Tags/WeaponTag.cs
Normal file
9
Zennysoft.Game.Ma.Implementation/Item/Tags/WeaponTag.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
|
public enum WeaponTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
SelfDamage,
|
||||||
|
IgnoreAffinity,
|
||||||
|
Knockback,
|
||||||
|
}
|
||||||
@@ -2,87 +2,23 @@
|
|||||||
|
|
||||||
namespace Zennysoft.Game.Ma.Implementation;
|
namespace Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
public enum WeaponTag
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
SelfDamage,
|
|
||||||
IgnoreAffinity,
|
|
||||||
Knockback,
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(WeaponTag))]
|
[JsonSerializable(typeof(WeaponTag))]
|
||||||
public partial class WeaponTagEnumContext : JsonSerializerContext;
|
public partial class WeaponTagEnumContext : JsonSerializerContext;
|
||||||
|
|
||||||
public enum ItemTag
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
BreaksOnChange
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(ItemTag))]
|
[JsonSerializable(typeof(ItemTag))]
|
||||||
public partial class ItemTagEnumContext : JsonSerializerContext;
|
public partial class ItemTagEnumContext : JsonSerializerContext;
|
||||||
|
|
||||||
public enum AccessoryTag
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
HalfVTConsumption,
|
|
||||||
StatusEffectImmunity
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(AccessoryTag))]
|
[JsonSerializable(typeof(AccessoryTag))]
|
||||||
public partial class AccessoryTagEnumContext : JsonSerializerContext;
|
public partial class AccessoryTagEnumContext : JsonSerializerContext;
|
||||||
|
|
||||||
public enum ThrowableItemTag
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
LowerTargetTo1HP,
|
|
||||||
CanChangeAffinity,
|
|
||||||
TeleportToRandomLocation,
|
|
||||||
WarpToExitIfFound
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(ThrowableItemTag))]
|
[JsonSerializable(typeof(ThrowableItemTag))]
|
||||||
public partial class ThrowableItemTagEnumContext : JsonSerializerContext;
|
public partial class ThrowableItemTagEnumContext : JsonSerializerContext;
|
||||||
|
|
||||||
public enum UsableItemTag
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
DoubleEXP,
|
|
||||||
IdentifyAllItemsCostHP,
|
|
||||||
BriefImmunity,
|
|
||||||
SwapHPAndVT,
|
|
||||||
TeleportAllEnemiesToRoom,
|
|
||||||
TurnAllEnemiesIntoHealingItem,
|
|
||||||
KillHalfEnemiesInRoom,
|
|
||||||
AbsorbHPFromAllEnemiesInRoom,
|
|
||||||
HealsAllInRoomToMaxHP,
|
|
||||||
DealElementalDamageToAllEnemiesInRoom,
|
|
||||||
RaiseCurrentWeaponAttack,
|
|
||||||
RaiseCurrentDefenseArmor,
|
|
||||||
RaiseLevel,
|
|
||||||
RandomEffect,
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(UsableItemTag))]
|
[JsonSerializable(typeof(UsableItemTag))]
|
||||||
public partial class UsableItemTagEnumContext : JsonSerializerContext;
|
public partial class UsableItemTagEnumContext : JsonSerializerContext;
|
||||||
|
|
||||||
public enum BoxItemTag
|
|
||||||
{
|
|
||||||
RandomNewItem,
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(BoxItemTag))]
|
[JsonSerializable(typeof(BoxItemTag))]
|
||||||
public partial class BoxItemTagEnumContext : JsonSerializerContext;
|
public partial class BoxItemTagEnumContext : JsonSerializerContext;
|
||||||
|
|
||||||
public enum ElementType
|
|
||||||
{
|
|
||||||
None,
|
|
||||||
Aeolic,
|
|
||||||
Telluric,
|
|
||||||
Hydric,
|
|
||||||
Igneous,
|
|
||||||
Ferrum
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonSerializable(typeof(ElementType))]
|
[JsonSerializable(typeof(ElementType))]
|
||||||
public partial class ElementTypeEnumContext : JsonSerializerContext;
|
public partial class ElementTypeEnumContext : JsonSerializerContext;
|
||||||
@@ -10,17 +10,14 @@
|
|||||||
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
||||||
<PackageReference Include="Chickensoft.Introspection" Version="2.2.0" />
|
<PackageReference Include="Chickensoft.Introspection" Version="2.2.0" />
|
||||||
<PackageReference Include="Chickensoft.Introspection.Generator" Version="2.2.0" />
|
<PackageReference Include="Chickensoft.Introspection.Generator" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.16.0" />
|
||||||
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
||||||
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.5.0" />
|
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.6.0-250131-2115.Release" />
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="21.2.1" />
|
<PackageReference Include="System.IO.Abstractions" Version="22.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj" />
|
<ProjectReference Include="..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Enums\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,51 +1,51 @@
|
|||||||
<Project Sdk="Godot.NET.Sdk/4.4.0">
|
<Project Sdk="Godot.NET.Sdk/4.4.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
<!-- Use NativeAOT. -->
|
<!-- Use NativeAOT. -->
|
||||||
<PublishAot>true</PublishAot>
|
<PublishAot>true</PublishAot>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="src\items\weapons\models\**" />
|
<Compile Remove="src\items\weapons\models\**" />
|
||||||
<EmbeddedResource Remove="src\items\weapons\models\**" />
|
<EmbeddedResource Remove="src\items\weapons\models\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Root the assemblies to avoid trimming. -->
|
<!-- Root the assemblies to avoid trimming. -->
|
||||||
<TrimmerRootAssembly Include="GodotSharp" />
|
<TrimmerRootAssembly Include="GodotSharp" />
|
||||||
<TrimmerRootAssembly Include="$(TargetName)" />
|
<TrimmerRootAssembly Include="$(TargetName)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Chickensoft.AutoInject" Version="2.5.0" />
|
<PackageReference Include="Chickensoft.AutoInject" Version="2.5.0" />
|
||||||
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
||||||
<PackageReference Include="Chickensoft.Introspection" Version="2.2.0" />
|
<PackageReference Include="Chickensoft.Introspection" Version="2.2.0" />
|
||||||
<PackageReference Include="Chickensoft.Introspection.Generator" Version="2.2.0" />
|
<PackageReference Include="Chickensoft.Introspection.Generator" Version="2.2.0" />
|
||||||
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.15.0" />
|
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.16.0" />
|
||||||
<PackageReference Include="Chickensoft.LogicBlocks.DiagramGenerator" Version="5.15.0" />
|
<PackageReference Include="Chickensoft.LogicBlocks.DiagramGenerator" Version="5.16.0" />
|
||||||
<PackageReference Include="Chickensoft.SaveFileBuilder" Version="1.1.0" />
|
<PackageReference Include="Chickensoft.SaveFileBuilder" Version="1.1.0" />
|
||||||
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
||||||
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.5.0" />
|
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.6.0-250131-2115.Release" />
|
||||||
<PackageReference Include="SimpleInjector" Version="5.5.0" />
|
<PackageReference Include="SimpleInjector" Version="5.5.0" />
|
||||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="21.2.1" />
|
<PackageReference Include="System.IO.Abstractions" Version="22.0.11" />
|
||||||
<PackageReference Include="Zeroconf" Version="3.7.16" />
|
<PackageReference Include="Zeroconf" Version="3.7.16" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="src\ui\dialogue\" />
|
<Folder Include="src\ui\dialogue\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include=".editorconfig" />
|
<None Include=".editorconfig" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj" />
|
<ProjectReference Include="..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\Zennysoft.Game.Ma.Implementation\Zennysoft.Game.Ma.Implementation.csproj" />
|
<ProjectReference Include="..\Zennysoft.Game.Ma.Implementation\Zennysoft.Game.Ma.Implementation.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Update="Godot.SourceGenerators" Version="4.4.0-dev.2" />
|
<PackageReference Update="Godot.SourceGenerators" Version="4.4.0-dev.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Update="GodotSharp" Version="4.4.0-dev.2" />
|
<PackageReference Update="GodotSharp" Version="4.4.0-dev.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Update="GodotSharpEditor" Version="4.4.0-dev.2" />
|
<PackageReference Update="GodotSharpEditor" Version="4.4.0-dev.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -2,7 +2,11 @@
|
|||||||
using Chickensoft.GodotNodeInterfaces;
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
using static Zennysoft.Game.Ma.AppLogic.Input;
|
using SimpleInjector;
|
||||||
|
using SimpleInjector.Lifestyles;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
using Zennysoft.Game.Ma.Implementation;
|
||||||
|
using static Zennysoft.Game.Ma.Implementation.AppLogic.Input;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|
||||||
@@ -35,9 +39,17 @@ public partial class App : CanvasLayer, IApp
|
|||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
|
var container = new SimpleInjector.Container();
|
||||||
|
container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
|
||||||
|
container.Register<IAppRepo, AppRepo>(Lifestyle.Singleton);
|
||||||
|
container.Register<IAppLogic, AppLogic>(Lifestyle.Singleton);
|
||||||
|
container.Verify();
|
||||||
|
|
||||||
Instantiator = new Instantiator(GetTree());
|
Instantiator = new Instantiator(GetTree());
|
||||||
AppRepo = new AppRepo();
|
|
||||||
AppLogic = new AppLogic();
|
AppRepo = container.GetInstance<IAppRepo>();
|
||||||
|
AppLogic = container.GetInstance<IAppLogic>();
|
||||||
|
|
||||||
AppLogic.Set(AppRepo);
|
AppLogic.Set(AppRepo);
|
||||||
AppLogic.Set(new AppLogic.Data());
|
AppLogic.Set(new AppLogic.Data());
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
uid://dyd1r1pl5beku
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://cbqvl36d7foae
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://b2hwfi78870pf
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dfygx4qdyomdw
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dqc8wddrx0txd
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://e51dlkiwpksy
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
@startuml AppLogic
|
|
||||||
state "AppLogic State" as Zennysoft_Game_Ma_AppLogic_State {
|
|
||||||
state "InGame" as Zennysoft_Game_Ma_AppLogic_State_InGame
|
|
||||||
state "LeavingMenu" as Zennysoft_Game_Ma_AppLogic_State_LeavingMenu
|
|
||||||
state "LoadingSaveFile" as Zennysoft_Game_Ma_AppLogic_State_LoadingSaveFile
|
|
||||||
state "MainMenu" as Zennysoft_Game_Ma_AppLogic_State_MainMenu
|
|
||||||
state "SplashScreen" as Zennysoft_Game_Ma_AppLogic_State_SplashScreen
|
|
||||||
}
|
|
||||||
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_InGame --> Zennysoft_Game_Ma_AppLogic_State_MainMenu : GameOver
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_LeavingMenu --> Zennysoft_Game_Ma_AppLogic_State_InGame : FadeOutFinished
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_LeavingMenu --> Zennysoft_Game_Ma_AppLogic_State_LoadingSaveFile : FadeOutFinished
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_LoadingSaveFile --> Zennysoft_Game_Ma_AppLogic_State_InGame : SaveFileLoaded
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_MainMenu --> Zennysoft_Game_Ma_AppLogic_State_LeavingMenu : LoadGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_MainMenu --> Zennysoft_Game_Ma_AppLogic_State_LeavingMenu : NewGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_MainMenu --> Zennysoft_Game_Ma_AppLogic_State_MainMenu : QuitGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_SplashScreen --> Zennysoft_Game_Ma_AppLogic_State_MainMenu : FadeOutFinished
|
|
||||||
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_InGame : OnEnter → ShowGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_InGame : OnExit → HideGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_InGame : OnGameOver → RemoveExistingGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_LeavingMenu : OnEnter → FadeToBlack
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_LoadingSaveFile : OnEnter → StartLoadingSaveFile
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_MainMenu : OnEnter → SetupGameScene, ShowMainMenu
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_MainMenu : OnQuitGame → ExitGame
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_SplashScreen : OnEnter → ShowSplashScreen
|
|
||||||
Zennysoft_Game_Ma_AppLogic_State_SplashScreen : OnSplashScreenSkipped() → HideSplashScreen
|
|
||||||
|
|
||||||
[*] --> Zennysoft_Game_Ma_AppLogic_State_SplashScreen
|
|
||||||
@enduml
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://ckb88dvtckagu
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://du7y6o0h004sm
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://b5j2df20jd05i
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://b5ehfb8l8u2fy
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://ddceu88ak7e41
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dxbrwt7jduxu8
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://xix7akau8f8g
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://cm2spwox38qgx
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bjhw05eivyte3
|
|
||||||
@@ -2,6 +2,7 @@ using Chickensoft.AutoInject;
|
|||||||
using Chickensoft.GodotNodeInterfaces;
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Zennysoft.Game.Ma.src.enemy;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Zennysoft.Game.Ma.src.enemy;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
using Zennysoft.Game.Ma.Implementation;
|
using Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Zennysoft.Game.Ma.src.enemy;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
using Zennysoft.Game.Ma.Implementation;
|
using Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Zennysoft.Game.Ma.src.enemy;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
using Zennysoft.Game.Ma.Implementation;
|
using Zennysoft.Game.Ma.Implementation;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
public partial class GameLogic
|
public partial class GameLogic
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Chickensoft.GodotNodeInterfaces;
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
namespace Zennysoft.Game.Ma;
|
namespace Zennysoft.Game.Ma;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user