forked from Shardstone/trail-into-darkness
Some renaming and added more settings
This commit is contained in:
@@ -60,6 +60,7 @@ namespace Nox.Game {
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed record Attribute {
|
||||
private readonly int values;
|
||||
public AttributeType attribute;
|
||||
@@ -71,12 +72,7 @@ namespace Nox.Game {
|
||||
|
||||
[Serializable]
|
||||
public sealed class EntityAttributes {
|
||||
public Attribute[] attributes = {
|
||||
new(AttributeType.Might, 1),
|
||||
new(AttributeType.Reflex, 1),
|
||||
new(AttributeType.Knowledge, 1),
|
||||
new(AttributeType.Perception, 1)
|
||||
};
|
||||
public Attribute[] attributes;
|
||||
|
||||
public static EntityAttributes operator +(EntityAttributes a, EntityAttributes b) {
|
||||
return new EntityAttributes {
|
||||
@@ -90,12 +86,7 @@ namespace Nox.Game {
|
||||
|
||||
[Serializable]
|
||||
public sealed class EntityStats {
|
||||
public Stat[] stats = {
|
||||
new(StatType.Health, 0),
|
||||
new(StatType.Stamina, 0),
|
||||
new(StatType.Level, 1),
|
||||
new(StatType.Experience, 0)
|
||||
};
|
||||
public Stat[] stats;
|
||||
|
||||
public int GetValue(StatType statType) {
|
||||
return stats.First(stat => stat.type == statType).value;
|
||||
|
||||
Reference in New Issue
Block a user