protected override void InitGrid()
        {
            switch (shape)
            {
            case Shape.Segment:
                Grid = LineGrid <TileCell> .Segment(size);

                break;

            case Shape.Custom:
                var shapeBuilder = GetComponent <CustomGridBuilder>();
                Grid = shapeBuilder.MakeGrid <TileCell, LinePoint>();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemple #2
0
        protected override void InitGrid()
        {
            switch (shape)
            {
            case Shape.List:
                Grid = LineGrid <TileCell> .Segment(pointList.Count);

                break;

            case Shape.Poisson:
                pointList = PoissonDisk.GeneratePoisson(
                    poissonDiskProperties.range.ToRect(),
                    poissonDiskProperties.minimumDistance,
                    poissonDiskProperties.pointCount);
                Grid = LineGrid <TileCell> .Segment(pointList.Count);

                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }