Skip to content

Add bearable single building generation algorithm. #4

Description

@Piliponful

Because right now, this is the code to make buildings -_-

        for (int x = 0; x < width; x++)
        {
            for (int y = 0; y < height; y++)
            {
                for (int z = 0; z < length; z++)
                {
                    if (Random.value > .5)
                    {
                        this.buildingScheme[x, y, z] = null;
                    }
                    else
                    {
                        Vector3Int position = new Vector3Int(x, y, z).multiply(this.blockSize);
                        if(Random.value > .5)
                        {
                            this.buildingScheme[x, y, z] = new BlockScheme(null, null, position, blockSize);
                        }
                        else
                        {
                            this.buildingScheme[x, y, z] = makeScheme(position);
                        }
                    }
                }
            }
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions