Esempio n. 1
0
 private void Update()
 {
     foreach (LevelBreakableWall breakable in breakableWalls)
     {
         if (breakable != null && breakable.health <= 0)
         {
             LevelCellEdge otherWall = breakable.otherCell.GetEdge(breakable.direction.GetOpposite());
             CreatePassage(breakable.cell, breakable.otherCell, breakable.direction, twoDMap, true);
             if (otherWall.image != null)
             {
                 Destroy(otherWall.image.gameObject);
             }
             if (breakable.image != null)
             {
                 Destroy(breakable.image.gameObject);
             }
             Destroy(otherWall.gameObject);
             Destroy(breakable.gameObject);
         }
     }
 }
Esempio n. 2
0
 public void SetEdge(LevelDirection direction, LevelCellEdge edge)
 {
     edges[(int)direction] = edge;
     initializedEdgeCount += 1;
 }