Files

26 lines
761 B
C#
Raw Permalink Normal View History

2026-04-05 18:57:16 +10:00
using System.Collections.Generic;
using KitchenLib.Utils;
using UnityEngine;
namespace Easter2025.Views.Local
{
public class EggPileView : MonoBehaviour
{
public List<GameObject> EggContainers = new List<GameObject>();
private void Awake()
{
foreach (GameObject eggContainer in EggContainers)
{
foreach (Transform Egg in eggContainer.transform)
{
Egg.gameObject.SetActive(false);
}
}
foreach (GameObject eggContainer in EggContainers)
{
eggContainer.transform.GetChild(Random.Range(0, eggContainer.transform.childCount)).gameObject.SetActive(true);
}
}
}
}