2023-08-22 17:58:50 +00:00
|
|
|
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
|
2023-09-08 13:05:43 +00:00
|
|
|
/// <summary>
|
|
|
|
/// A ScriptableObject for storing a set of prefabs related to a single level.
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// This class is used to manage a collection of prefabs that are associated with a single level.
|
|
|
|
/// It includes functionality to initialize and access the prefab set.
|
|
|
|
/// </remarks>
|
2023-08-22 17:58:50 +00:00
|
|
|
[CreateAssetMenu(menuName = "Single Level Prefab Set")]
|
|
|
|
public class BlocksSet : ScriptableObject
|
|
|
|
{
|
|
|
|
public GameObject[] prefabs;
|
|
|
|
[NonSerialized] public int prefabSize = 0;
|
|
|
|
|
2023-09-08 13:05:43 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Initializes the prefab set.
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// This method calculates and stores the size of the prefab set.
|
|
|
|
/// </remarks>
|
2023-08-22 17:58:50 +00:00
|
|
|
public void InitializeBlocksSet()
|
|
|
|
{
|
|
|
|
// get prefab size
|
|
|
|
prefabSize = prefabs.Length;
|
|
|
|
}
|
|
|
|
}
|