idle-survivors/Assets/Scripts/HeroPartySO.cs
zephyr f70aa57166
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
party (#15)
Resolves #6.
Updates #3.

Co-authored-by: Branden J Brown <zephyrtronium@gmail.com>
Reviewed-on: #15
Reviewed-by: madxmike <madxmike@noreply.localhost>
2023-08-09 21:40:32 -04:00

17 lines
554 B
C#

using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using UnityEngine;
[CreateAssetMenu(fileName = "HeroParty", menuName = "Hero Party")]
public class HeroPartySO : ScriptableObject
{
[SerializeField]
private List<HeroUnit> unitList = new List<HeroUnit>();
public ReadOnlyCollection<HeroUnit> UnitList => unitList.AsReadOnly();
public void Add(HeroUnit unit) { unitList.Add(unit); }
public void Remove(HeroUnit unit) { unitList.Remove(unit); }
public int Count => unitList.Count;
}