public static bool __CompilerHint__Line__TileCell() { var grid = new LineGrid<TileCell[]>(1, 1); foreach(var point in grid) { grid[point] = new TileCell[1]; } var shapeStorageInfo = new ShapeStorageInfo<LinePoint>(new IntRect(), p => true); var shapeInfo = new LineShapeInfo<TileCell>(shapeStorageInfo); return grid[grid.First()][0] == null || shapeInfo.Translate(LinePoint.Zero) != null; }
public static bool __CompilerHint2__Rect() { //Ensures abstract super classes for base grids gets created var grid = new RectGrid<__CellType>(1, 1, p => p == RectPoint.Zero, x => x, x => x, new List<RectPoint>()); //Ensures shape infpo classes get created var shapeStorageInfo = new ShapeStorageInfo<RectPoint>(new IntRect(), p => true); var shapeInfo = new RectShapeInfo<__CellType>(shapeStorageInfo); return grid[grid.First()] == null || shapeInfo.Translate(RectPoint.Zero) != null; }
public static bool __CompilerHint1__Diamond__UVCell() { var grid = new DiamondGrid<UVCell[]>(1, 1); foreach(var point in grid) { grid[point] = new UVCell[1]; } var shapeStorageInfo = new ShapeStorageInfo<DiamondPoint>(new IntRect(), p => true); var shapeInfo = new DiamondShapeInfo<UVCell>(shapeStorageInfo); return grid[grid.First()][0] == null || shapeInfo.Translate(DiamondPoint.Zero) != null; }
public static bool __CompilerHint2__Diamond__TileCell() { //Ensures abstract super classes for base grids gets created var grid = new DiamondGrid<TileCell>(1, 1, p => p == DiamondPoint.Zero, x => x, x => x, new List<DiamondPoint>()); //Ensures shape infpo classes get created var shapeStorageInfo = new ShapeStorageInfo<DiamondPoint>(new IntRect(), p => true); var shapeInfo = new DiamondShapeInfo<TileCell>(shapeStorageInfo); return grid[grid.First()] == null || shapeInfo.Translate(DiamondPoint.Zero) != null; }
public static bool __CompilerHint__FlatTri__TileCell() { var grid1 = new PointyHexGrid<TileCell[]>(1, 1); foreach(var point in grid1) { grid1[point] = new TileCell[1]; } var grid2 = new FlatTriGrid<TileCell>(1, 1); foreach(var point in grid2) { grid2[point] = null; } var shapeStorageInfo = new ShapeStorageInfo<FlatTriPoint>(new IntRect(), p => true); var shapeInfo = new FlatTriShapeInfo<TileCell>(shapeStorageInfo); return grid1[grid1.First()][0] == null || grid2[grid2.First()] == null || shapeInfo.IncIndex(0) != null; }
/** Call this method if you use a DiamondGrid. Replace the type __CellType to whatever type you have in your grid. You can call the method anywhere in your code. if(!__CompilerHint__Diamond()) return; This methods always returns true. @since 1.6 */ public static bool __CompilerHint1__Diamond() { //Ensures abstract super classes for base grids gets created var grid = new DiamondGrid<__CellType[]>(1, 1); foreach(var point in grid) { grid[point] = new __CellType[1]; } //Ensures shape infpo classes get created var shapeStorageInfo = new ShapeStorageInfo<DiamondPoint>(new IntRect(), p => true); var shapeInfo = new DiamondShapeInfo<__CellType>(shapeStorageInfo); return grid[grid.First()][0] == null || shapeInfo.Translate(DiamondPoint.Zero) != null; }
/** Call this method if you use a CairoGrid. Replace the type __CellType to whatever type you have in your grid. You can call the method anywhere in your code. if(!__CompilerHint__Cairo()) return; This methods always returns true. @since 1.6 */ public static bool __CompilerHint__Cairo() { //Ensures abstract super classes for base grids gets created var grid = new PointyHexGrid<__CellType[]>(1, 1); foreach(var point in grid) { grid[point] = new __CellType[1]; } //Ensures shape infpo classes get created var shapeStorageInfo = new ShapeStorageInfo<CairoPoint>(new IntRect(), p => true); var shapeInfo = new CairoShapeInfo<__CellType>(shapeStorageInfo); return grid[grid.First()][0] == null || shapeInfo.IncIndex(0) != null; }
public static bool __CompilerHint__FlatHex__MeshTileCell() { var grid = new FlatHexGrid<MeshTileCell[]>(1, 1); foreach(var point in grid) { grid[point] = new MeshTileCell[1]; } var shapeStorageInfo = new ShapeStorageInfo<FlatHexPoint>(new IntRect(), p => true); var shapeInfo = new FlatHexShapeInfo<MeshTileCell>(shapeStorageInfo); return grid[grid.First()][0] == null || shapeInfo.Translate(FlatHexPoint.Zero) != null; }
public static bool __CompilerHint__Cairo__UVCell() { var grid1 = new PointyHexGrid<UVCell[]>(1, 1); foreach(var point in grid1) { grid1[point] = new UVCell[1]; } var grid2 = new CairoGrid<UVCell>(1, 1); foreach(var point in grid2) { grid2[point] = null; } var shapeStorageInfo = new ShapeStorageInfo<CairoPoint>(new IntRect(), p => true); var shapeInfo = new CairoShapeInfo<UVCell>(shapeStorageInfo); return grid1[grid1.First()][0] == null || grid2[grid2.First()] == null || shapeInfo.IncIndex(0) != null; }
public static bool __CompilerHint__PointyRhomb__SpriteCell() { var grid1 = new PointyHexGrid<SpriteCell[]>(1, 1); foreach(var point in grid1) { grid1[point] = new SpriteCell[1]; } var grid2 = new PointyRhombGrid<SpriteCell>(1, 1); foreach(var point in grid2) { grid2[point] = null; } var shapeStorageInfo = new ShapeStorageInfo<PointyRhombPoint>(new IntRect(), p => true); var shapeInfo = new PointyRhombShapeInfo<SpriteCell>(shapeStorageInfo); return grid1[grid1.First()][0] == null || grid2[grid2.First()] == null || shapeInfo.IncIndex(0) != null; }
public static bool __CompilerHint__Rect__SpriteCell() { var grid = new RectGrid<SpriteCell[]>(1, 1); foreach(var point in grid) { grid[point] = new SpriteCell[1]; } var shapeStorageInfo = new ShapeStorageInfo<RectPoint>(new IntRect(), p => true); var shapeInfo = new RectShapeInfo<SpriteCell>(shapeStorageInfo); return grid[grid.First()][0] == null || shapeInfo.Translate(RectPoint.Zero) != null; }
public static bool __CompilerHint2__FlatHex__SpriteCell() { //Ensures abstract super classes for base grids gets created var grid = new FlatHexGrid<SpriteCell>(1, 1, p => p == FlatHexPoint.Zero, x => x, x => x, new List<FlatHexPoint>()); //Ensures shape infpo classes get created var shapeStorageInfo = new ShapeStorageInfo<FlatHexPoint>(new IntRect(), p => true); var shapeInfo = new FlatHexShapeInfo<SpriteCell>(shapeStorageInfo); return grid[grid.First()] == null || shapeInfo.Translate(FlatHexPoint.Zero) != null; }