public void Load() //same as LoadPettern in GameManager script { DeleteGrid(); GridData data = GridSaveControler.Load(); GenerateGrid(data.size); for (int i = 0; i < Size; i++) { for (int j = 0; j < Size * 2; j++) { if (data.grid[i, j] == 0) { Tiles[i, j] = 0; } else { Set_Mat_ID(data.grid[i, j]); SetTileMatColor(); Vector3 temp; temp = new Vector3(i * cell_Size.x + cell_Size.x / 2, j * cell_Size.y + cell_Size.y / 2, transform.position.z); temp = new Vector3(temp.x - transform.localScale.x / 2, temp.y - transform.localScale.y / 2); temp += transform.position; GameObject go = Instantiate(TilePrefab, temp, Quaternion.identity); go.transform.localScale = cell_Size; go.transform.SetParent(transform); Tiles[i, j] = Mat_ID; } } } }
private void SetData_level() { //saved data from levelmake sceane if (Level == -1) { data.size = 5; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } else if (Level == -2) //this is generated level in creative mod { string path = Application.persistentDataPath + "/GridData.save"; if (File.Exists(path)) { data = GridSaveControler.Load(); } else { data.size = 5; //saved data from levelmake sceane data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } } //..............................LEVELS DATA START FROM HERE...............// else if (Level == 1) { data.size = 5; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 4, 0, 0, 0 }, { 0, 0, 0, 0, 5, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 5, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } else if (Level == 2) { data.size = 5; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 3, 0, 0, 0, 0, 5, 0, 0 }, { 3, 3, 3, 3, 3, 3, 5, 4, 5, 0 }, { 0, 0, 3, 0, 0, 0, 0, 5, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } else if (Level == 3) { data.size = 5; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, { 0, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } else if (Level == 4) { data.size = 5; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 5, 4, 4, 4, 2, 0, 0, 0 }, { 0, 0, 5, 3, 3, 3, 2, 0, 0, 0 }, { 0, 0, 5, 4, 4, 4, 2, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } else if (Level == 5) // { data.size = 6; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 6, 6, 6, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 6, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; } else if (Level == 6) // { data.size = 6; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0 }, { 0, 0, 0, 0, 4, 0, 5, 5, 0, 0, 0, 0 }, { 0, 0, 0, 0, 4, 4, 5, 2, 2, 2, 0, 0 }, { 0, 0, 0, 0, 4, 4, 4, 3, 2, 2, 0, 0 }, { 0, 0, 0, 0, 0, 0, 3, 3, 0, 2, 0, 0 }, { 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0 } }; } else if (Level == 7) // { data.size = 7; data.grid = new int[, ] { { 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 3, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1 }, { 1, 1, 1, 3, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1 }, { 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1 }, { 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 1, 1, 1 }, { 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 3, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1 } }; } else if (Level == 8) { data.size = 8; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 1, 0, 0, 0, 0 }, { 0, 0, 1, 1, 1, 0, 0, 0, 1, 5, 5, 1, 0, 0, 0, 0 }, { 0, 0, 1, 5, 1, 1, 0, 0, 1, 5, 5, 1, 0, 0, 0, 0 }, { 0, 0, 1, 5, 5, 1, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0 }, { 0, 0, 1, 5, 5, 5, 5, 1, 5, 5, 1, 5, 1, 1, 1, 0 }, { 0, 0, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1 } }; } else if (Level == 9) { data.size = 9; data.grid = new int[, ] { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 3, 3, 3, 3, 3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, 1, 0, 0 }, { 1, 5, 5, 5, 4, 5, 5, 5, 1, 1, 1, 5, 5, 5, 5, 5, 5, 1, 0, 0 } }; } else if (Level == 11) { data.size = 7; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 0, 0 }, { 0, 0, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 0 }, { 5, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 1, 2 }, { 5, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 0, 1, 2 }, { 5, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2 }, { 5, 2, 2, 2, 2, 2, 2, 5, 5, 2, 2, 2, 2, 0 } }; } else if (Level == 12) { data.size = 7; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 1, 4, 4, 4, 4, 4, 1, 0, 0 }, { 0, 0, 0, 0, 1, 4, 4, 4, 4, 4, 4, 4, 1, 0 }, { 0, 0, 0, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 }, { 0, 0, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 }, { 0, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 0 } }; } else if (Level == 13) { data.size = 10; data.grid = new int[, ] { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,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