add duders to the party
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user