Skip to content

Commit

Permalink
Fixed missing generic and added helper wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
grofit committed Sep 15, 2023
1 parent 9956c8a commit f4fae77
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/OpenRpg.Combat/OpenRpg.Combat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
<ProjectReference Include="..\OpenRpg.Core\OpenRpg.Core.csproj" />
</ItemGroup>


</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using OpenRpg.Core.Stats.Entity;

namespace OpenRpg.Combat.Processors.Attacks.Entity
{
public interface IEntityAttackGenerator : IAttackGenerator<IEntityStatsVariables>
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using OpenRpg.Core.Stats.Entity;

namespace OpenRpg.Combat.Processors.Attacks.Entity
{
public interface IEntityAttackProcessor : IAttackProcessor<IEntityStatsVariables>
{}
}
5 changes: 3 additions & 2 deletions src/OpenRpg.Combat/Processors/Attacks/IAttackGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using OpenRpg.Combat.Attacks;
using OpenRpg.Core.Stats;
using OpenRpg.Core.Stats.Entity;

namespace OpenRpg.Combat.Processors.Attacks
{
public interface IAttackGenerator
public interface IAttackGenerator<in T> where T : IStatsVariables
{
Attack GenerateAttack(IStatsVariables stats);
Attack GenerateAttack(T stats);
}
}

0 comments on commit f4fae77

Please sign in to comment.