forked from Shardstone/trail-into-darkness
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
|
|
namespace Nox.Game {
|
|
public interface ICharacterStatsFactory {
|
|
EntityStats Create(EntityAttributes attributes);
|
|
}
|
|
|
|
public sealed class CharacterStatsFactoryOptions {
|
|
public EntityStats entityStats = new EntityStats() {
|
|
health = 10,
|
|
stamina = 10,
|
|
level = 1,
|
|
experience = 0
|
|
};
|
|
}
|
|
|
|
public sealed class CharacterStatsFactory : ICharacterStatsFactory {
|
|
private readonly CharacterStatsFactoryOptions options;
|
|
|
|
public CharacterStatsFactory(CharacterStatsFactoryOptions options = null) {
|
|
this.options = options ?? new CharacterStatsFactoryOptions();
|
|
}
|
|
|
|
public EntityStats Create(EntityAttributes attributes) {
|
|
if(attributes == null) {
|
|
throw new ArgumentNullException(nameof(attributes));
|
|
}
|
|
|
|
// int maxHealth = options.baseHealth + attributes.might * options.mightHealthBonus;
|
|
// int maxStamina = options.baseStamina +
|
|
// attributes.might * options.mightStaminaBonus +
|
|
// attributes.knowledge * options.knowledgeStaminaBonus;
|
|
|
|
return new EntityStats { };
|
|
}
|
|
}
|
|
}
|