Refactor character attributes system; replace individual attributes with a dictionary-based approach for better scalability and maintainability

This commit is contained in:
2025-08-02 06:06:51 +02:00
parent 93cbc4a3e5
commit 3871cba753
21 changed files with 505 additions and 417 deletions

View File

@@ -13,12 +13,12 @@ namespace Systems
private void OnEnable()
{
character.attributes.OnHealthChanged += OnHealthChanged;
character.attributes.Subscribe(Attribute.Health, OnHealthChanged);
}
private void OnDisable()
{
character.attributes.OnHealthChanged -= OnHealthChanged;
character.attributes.Unsubscribe(Attribute.Health, OnHealthChanged);
}
private void OnHealthChanged(float newHealth)