Damage dealing through meta attribute and custom exec
This commit is contained in:
13
forge/attribute_sets/CharacterAttributeSet.cs
Normal file
13
forge/attribute_sets/CharacterAttributeSet.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
1
forge/attribute_sets/CharacterAttributeSet.cs.uid
Normal file
1
forge/attribute_sets/CharacterAttributeSet.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cikbxmilitd1m
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user