2023-08-04 18:37:13 -05:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Component that makes a duder a duder.
|
|
|
|
/// Manages class, skills, level, attrs, and AI.
|
|
|
|
/// </summary>
|
|
|
|
public class HeroUnit : MonoBehaviour
|
|
|
|
{
|
|
|
|
[SerializeField] private new string name;
|
|
|
|
[SerializeField] private HeroClassSO class_;
|
|
|
|
[SerializeField] private long level;
|
|
|
|
[SerializeField] private long xp;
|
|
|
|
[SerializeField] private HeroAttributesSO attrs;
|
2023-08-06 12:57:14 -05:00
|
|
|
[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);
|
|
|
|
}
|
2023-08-04 18:37:13 -05:00
|
|
|
}
|