17 lines
554 B
C#
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;
|
||
|
}
|