add duders to the party

This commit is contained in:
2023-08-06 12:57:14 -05:00
parent 5b8f97e871
commit e8f581dea8
2 changed files with 19 additions and 6 deletions

View File

@@ -13,4 +13,16 @@ public class HeroUnit : MonoBehaviour
[SerializeField] private long level;
[SerializeField] private long xp;
[SerializeField] private HeroAttributesSO attrs;
[SerializeField] private HeroPartySO party;
private void OnEnable()
{
// NOTE(zeph): Party is mandatory. If none is set, we want an exception.
party.Add(this);
}
private void OnDisable()
{
party.Remove(this);
}
}