using System; using UnityEngine; /// /// ScriptableObject for storing a collection of all level prefab sets. /// /// /// This class is used to organize and initialize multiple level prefab sets. /// [CreateAssetMenu(menuName = "All Level Prefab Set")] public class TargetLevelsSet : ScriptableObject { public BlocksSet[] singleLevelSet; [NonSerialized] public int levelSize = 0; /// /// Initialize the level collection. /// /// /// This method retrieves the size of the level collection and initializes each individual level prefab set. /// public void InitializeLevelsSet() { // get level size levelSize = singleLevelSet.Length; for(int i = 0; i < levelSize; i++) { // initialize all single level prefab set singleLevelSet[i].InitializeBlocksSet(); } } }