actually calling update effects
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 6m46s

This commit is contained in:
2026-04-14 19:29:43 +02:00
parent 7ab78aa57f
commit 585c2302d6
11 changed files with 58 additions and 40 deletions

View File

@@ -10,11 +10,13 @@ namespace Movementtests.forge.abilities;
public class EffectApplicationBehavior(EffectData effectData) : IAbilityBehavior
{
private Effect? _effect;
private ActiveEffectHandle? _effectHandle;
public void OnStarted(AbilityBehaviorContext context)
{
GD.Print("This is applying the periodic effect to the flying weapon");
_effectHandle = context.Owner.EffectsManager.ApplyEffect(new Effect(effectData, new EffectOwnership(context.Owner, context.Owner)));
_effect = new Effect(effectData, new EffectOwnership(context.Owner, context.Owner));
_effectHandle = context.Owner.EffectsManager.ApplyEffect(_effect);
context.AbilityHandle.CommitAbility();
}

View File

@@ -0,0 +1,16 @@
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, 150);
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
}
}

View File

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

View File

@@ -0,0 +1,19 @@
using Gamesmiths.Forge.Attributes;
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, 150);
Mana = InitializeAttribute(nameof(Mana), 100, 0, 100);
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
}
}

View File

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

View File

@@ -0,0 +1,13 @@
using Gamesmiths.Forge.Attributes;
namespace Movementtests.scenes.player_controller.components.weapon;
public class WeaponAttributeSet : AttributeSet
{
public EntityAttribute Level { get; }
public WeaponAttributeSet()
{
Level = InitializeAttribute(nameof(Level), 1, 1, 10);
}
}

View File

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