Damage dealing through meta attribute and custom exec
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 30s
Create tag and build when new code gets to main / Export (push) Successful in 6m8s

This commit is contained in:
2026-05-03 10:47:56 +02:00
parent 631935fdc8
commit 99f383be00
29 changed files with 453 additions and 143 deletions

View File

@@ -0,0 +1,13 @@
using Gamesmiths.Forge.Attributes;
namespace Movementtests.forge.attribute_sets;
public class CharacterAttributeSet : AttributeSet
{
public EntityAttribute Health { get; }
public CharacterAttributeSet()
{
Health = InitializeAttribute(nameof(Health), 100, 0, 100);
}
}

View File

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

View File

@@ -1,15 +1,14 @@
using Gamesmiths.Forge.Attributes;
namespace Movementtests.scenes.enemies;
public class EnemyAttributeSet : AttributeSet
{
public EntityAttribute Health { get; }
public EntityAttribute Strength { get; }
public EntityAttribute Speed { get; }
public EnemyAttributeSet()
{
Health = InitializeAttribute(nameof(Health), 100, 0, 100);
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
}

View File

@@ -7,6 +7,6 @@ public class MetaAttributeSet : AttributeSet
public MetaAttributeSet()
{
IncomingDamage = InitializeAttribute(nameof(IncomingDamage), 0, 0, 1000, channels: 2);
IncomingDamage = InitializeAttribute(nameof(IncomingDamage), 0, 0, 1000, channels: 4);
}
}

View File

@@ -4,16 +4,10 @@ namespace Movementtests.scenes.player_controller.scripts;
public class PlayerAttributeSet : AttributeSet
{
public EntityAttribute Health { get; }
public EntityAttribute Mana { get; }
public EntityAttribute Strength { get; }
public EntityAttribute Speed { get; }
public PlayerAttributeSet()
{
Health = InitializeAttribute(nameof(Health), 100, 0, 100);
Mana = InitializeAttribute(nameof(Mana), 100, 0, 100);
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
}
}