/// <summary> /// Default constructor. /// </summary> public Cell() { _cellColour = CellColour.White; _containsAnt = false; _antDirection = Direction.Up; }
/// <summary> /// Constructor. /// Creates a cell with the provided colour. /// </summary> public Cell(CellColour cellColour) { _cellColour = cellColour; _containsAnt = false; _antDirection = Direction.Up; }
private void SetField(ref List <Stack <GameObject> > listReservCellsStack, ref List <Stack <GameObject> > listOnFieldCellsStack, CellColour colour, int level, Vector3 firstCellPosition) { Vector3 curentCellPosition = firstCellPosition; switch (colour) { case CellColour.blue: curentCellPosition.z = 3; break; case CellColour.green: curentCellPosition.z = 4; break; case CellColour.yellow: curentCellPosition.z = 5; break; default: curentCellPosition.z = 3; break; } Vector3 unitScale = new Vector3(curentUnitScale, curentUnitScale, curentUnitScale); ActivateCellsRow(ref listReservCellsStack, ref listOnFieldCellsStack, Row.first, ref curentCellPosition, unitScale); ActivateCellsRow(ref listReservCellsStack, ref listOnFieldCellsStack, Row.allMiddle, ref curentCellPosition, unitScale); ActivateCellsRow(ref listReservCellsStack, ref listOnFieldCellsStack, Row.last, ref curentCellPosition, unitScale); }