Branden J Brown 15d8d1837d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
test that heroes are tracked by the party
2023-08-06 22:49:02 -05:00

37 lines
893 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("TestsPlaymode")]
/// <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;
[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);
}
internal HeroPartySO getParty()
{
return party;
}
}