Some renaming and added more settings

This commit is contained in:
Sebastian Bularca
2026-03-29 19:16:39 +02:00
parent 71b432e253
commit 00c1764fdb
59 changed files with 149 additions and 183 deletions

View File

@@ -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;