public void createZones() { Transform[] zones = LayoutLogic.getSpecificTransformsTag(CommonLogic.TAG_HOLDER_ZONE, areaHolder); //GameObject[] zones = GameObject.FindGameObjectsWithTag("ZoneHolder"); for (int i = 0; i < zones.Length; i++) { areaZones.Add(new GameZone(areaHolder, zones[i])); } }
public GameZone(Transform a, Transform z) { //Debug.Log("GameZone " + a.name + "/" + z.name + " starting"); zoneName = z.name; zone = z.GetComponentInChildren <Zone>(); holders.setMainHolders(a, z); holders.setChildHolders( LayoutLogic.getSpecificTransformTag(CommonLogic.TAG_HOLDER_DICE, z), LayoutLogic.getSpecificTransformTag(CommonLogic.TAG_HOLDER_CARD, z), LayoutLogic.getSpecificTransformTag(CommonLogic.TAG_HOLDER_TOKEN, z)); zone.holders = holders; zone.zoneName = holders.zoneHolder.name; checkIfCard(); //Debug.Log("GameZone " + a.name + "/" + z.name + " created"); }