Exemplo n.º 1
0
    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);
                }
            }
        }
    }
Exemplo n.º 2
0
 public void AddChunk(WallChunk chunk)
 {
     chunk.tag = "WallChunk";
     chunks.Add(chunk);
     chunk.SetParent(this);
 }
Exemplo n.º 3
0
 void Start()
 {
     _wall  = GetComponent <WallChunk> ();
     _chunk = _wall;
 }
Exemplo n.º 4
0
 public void ChunkDestroyed(WallChunk chunk)
 {
     m_destroyedThisFrame.Add(chunk);
 }