basic forge setup and refactored for some warning
This commit is contained in:
20
scenes/player_controller/scripts/PlayerAttributeSet.cs
Normal file
20
scenes/player_controller/scripts/PlayerAttributeSet.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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()
|
||||
{
|
||||
// Initialize the attributes with the current, min and max values.
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user