levels ig

This commit is contained in:
cemt1363
2026-06-06 17:00:28 +02:00
parent d6fddf90bc
commit b7b188ffa9
19 changed files with 903 additions and 727 deletions
+15 -4
View File
@@ -2,13 +2,24 @@ using UnityEngine;
public class PatternSelecter : MonoBehaviour
{
bool isStarting = true;
void Start()
{
foreach (Transform child in transform)
child.gameObject.SetActive(false);
if (isStarting)
{
transform.GetChild(0).gameObject.SetActive(true);
} else
{
foreach (Transform child in transform)
child.gameObject.SetActive(false);
int randomIndex = Random.Range(0, transform.childCount);
int randomIndex = Random.Range(1, transform.childCount);
transform.GetChild(randomIndex).gameObject.SetActive(true);
}
transform.GetChild(randomIndex).gameObject.SetActive(true);
}
}