void Start () { playersCarTs = playersCar.transform; cubeList = ISSCDBlocksList.LoadList (); allKindOfCubes = new GameObject[cubeList.blocks.Length]; for (int i = 0; i < allKindOfCubes.Length; i++) { allKindOfCubes [i] = cubeList.blocks [i].gameObject; } json = ISSCDGridFileUtilities.LoadFileAsJson (Application.dataPath + "/Resources/", fileName); ccs = new CarsCubes (int.Parse (json ["size"] ["x"].ToString ()), int.Parse (json ["size"] ["y"].ToString ()), int.Parse (json ["size"] ["z"].ToString ())); }
void Start() { playersCarTs = playersCar.transform; cubeList = ISSCDBlocksList.LoadList(); allKindOfCubes = new GameObject[cubeList.blocks.Length]; for (int i = 0; i < allKindOfCubes.Length; i++) { allKindOfCubes [i] = cubeList.blocks [i].gameObject; } json = ISSCDGridFileUtilities.LoadFileAsJson(Application.dataPath + "/Resources/", fileName); ccs = new CarsCubes(int.Parse(json ["size"] ["x"].ToString()), int.Parse(json ["size"] ["y"].ToString()), int.Parse(json ["size"] ["z"].ToString())); }
void Start() { Debug.Log(Screen.width + " " + Screen.height); playersCarTs = playersCar.transform; cubeList = ISSCDBlocksList.LoadList(); allKindOfCubes = new GameObject[cubeList.blocks.Length]; for (int i = 0; i < allKindOfCubes.Length; i++) { allKindOfCubes [i] = cubeList.blocks [i].gameObject; } json = ISSCDGridFileUtilities.LoadFileAsJson(Application.dataPath + "/Resources/", fileName); ccs = new CarsCubes(int.Parse(json ["size"] ["x"].ToString()), int.Parse(json ["size"] ["y"].ToString()), int.Parse(json ["size"] ["z"].ToString())); originPos = getOriginPos(); centerPos = getPosByIds(ccs.sizeX / 2, ccs.sizeY / 2, ccs.sizeZ / 2); Debug.Log(centerPos); spawnCubes(); StartCoroutine(CanStartGame()); }