// Use this for initialization void Start() { trans = GameObject.Find("GameObject").GetComponent <TransferDimensions>(); xwall = trans.defx; ywall = trans.defx; zwall = trans.defx; }
// Use this for initialization void Start() { trans = GameObject.Find("GameObject").GetComponent <TransferDimensions>(); x = trans.defx; y = trans.defx; z = trans.defx; transform.position = new Vector3(x, 3, z); }
// Use this for initialization void Start() { trans = GameObject.Find("GameObject").GetComponent <TransferDimensions>(); int maxdim = trans.defx; Instantiate(light1, new Vector3(0, maxdim, 0), Quaternion.identity); Instantiate(light2, new Vector3(0, maxdim, maxdim), Quaternion.identity); Instantiate(light3, new Vector3(maxdim, maxdim, 0), Quaternion.identity); Instantiate(light4, new Vector3(maxdim, maxdim, maxdim), Quaternion.identity); }
// Use this for initialization void Start() { trans = GameObject.Find("GameObject").GetComponent <TransferDimensions>(); xdim = trans.defx; ydim = trans.defx; zdim = trans.defx; for (int i = 0; i < xdim; i++) { for (int j = 0; j < zdim; j++) { int random = Random.Range(1, 5); if (j == Mathf.Round(zdim / 2) && i == Mathf.Round(xdim / 2)) { Instantiate(MCube, new Vector3(xpos, 0, zpos), Quaternion.identity); } else { if (random == 1) { Instantiate(RCube, new Vector3(xpos, 0, zpos), Quaternion.identity); } else if (random == 2) { Instantiate(BCube, new Vector3(xpos, 0, zpos), Quaternion.identity); } else if (random == 3) { Instantiate(GCube, new Vector3(xpos, 0, zpos), Quaternion.identity); } else { Instantiate(YCube, new Vector3(xpos, 0, zpos), Quaternion.identity); } } zpos += 2; } zpos = 0; xpos += 2; } }