public Walls(LevelGrid grid, LevelLayout layout) { m_grid = grid; for (int x = 0; x < m_grid.NumCellsX; x++) { for (int y = 0; y < m_grid.NumCellsY; y++) { bool[][] contents = layout.GetContents(); bool test = contents[0][0]; if ( contents[x][y]) { WallChunk newChunk = new WallChunk(this); m_chunks.Add(newChunk); m_grid.GetCell(x, y).AddContents(newChunk); } } } }
public void AddChunk(WallChunk chunk) { chunk.tag = "WallChunk"; chunks.Add(chunk); chunk.SetParent(this); }
void Start() { _wall = GetComponent <WallChunk> (); _chunk = _wall; }
public void ChunkDestroyed(WallChunk chunk) { m_destroyedThisFrame.Add(chunk); }