add basic hero party

This commit is contained in:
2023-08-05 22:54:42 -05:00
parent 81c1c0de0e
commit 5b8f97e871
4 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
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); }
}

11
Assets/Scripts/HeroPartySO.cs.meta generated Normal file
View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f0603cf6e7f1d884e89c3eb6a478a96c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: