Implemented dice rolling.

This commit is contained in:
Max Dodd 2025-01-19 18:59:50 +01:00
parent 4bd34a1335
commit 2b08dc425f
15 changed files with 1419 additions and 4 deletions

View file

@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public static class Helper
{
public static GameObject[] GetTaggedChildren(GameObject parent, string tag) {
List<GameObject> childrenWithTag = new List<GameObject>();
foreach (Transform child in parent.transform)
{
if (child.CompareTag(tag))
{
childrenWithTag.Add(child.gameObject);
}
}
return childrenWithTag.ToArray();
}
}