zephyr
a67aee24aa
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Resolves #6. Updates #3. Co-authored-by: Branden J Brown <zephyrtronium@gmail.com> Reviewed-on: #15 Reviewed-by: madxmike <madxmike@noreply.localhost>
34 lines
850 B
C#
34 lines
850 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Assertions;
|
|
|
|
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;
|
|
internal HeroPartySO party => _party;
|
|
|
|
private void OnEnable()
|
|
{
|
|
Assert.IsNotNull(_party);
|
|
_party.Add(this);
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
_party.Remove(this);
|
|
}
|
|
}
|