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); }
private static bool CellLink(CellAttributes currentCell, Vector3 direction) { return(CellsCreator.AllowGrowthInDirection(currentCell, direction)); }