예제 #1
0
 private bool CellHasLivingNeighbour(CellAttributes cell)
 {
     Vector3[] vectors = Cell.vectors;
     for (int i = 0; i < vectors.Length; i++)
     {
         if (CellsCreator.AllowGrowthInDirection(cell, vectors[i]))
         {
             CellAttributes c = cells.GetCell(cell.relativePosition + vectors[i]);
             if (c != null && c.alive && CellsCreator.AllowGrowthInDirection(c, -vectors[i]))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #2
0
 private static bool CellLink(CellAttributes currentCell, Vector3 direction)
 {
     return(CellsCreator.AllowGrowthInDirection(currentCell, direction));
 }