If I have 2 squad type. Regular and Elite.
A regular squad can have 9 units per squad, and an Elite squad can have 4. A squad spawner may refer to this data, different squad that is already spawned may refer to this data when getting reinforced etc etc.
I feel like the “max number of units” setting should be stored in a database or a static data class. so it only exist in 1 place.
public enum SquadType
{
Regular,
Elite,
}
[System.Serializable]
public class SquadSettings
{
public SquadType squadType;
public int MAX_NUM_OF_UNITS;
}
[SerializeField] List<SquadSettings> SquadSettings = new List<SquadSettings>();
Where do I put this SquadSettings list?
Maybe a Singleton GameManager script attached to an empty gameobject that persist through each scene?