Exemplo n.º 1
0
    public override void generate()
    {
        if (!generated)
        {
            type      = TreeType.Shirakashi;
            mesh      = BPMesh.generateTree(new TreeInfo(type, TreeInfo.getMaxHeight(type) / TreeInfo.getGrowSpeed(type)));
            generated = true;
        }

        if (entity == null)
        {
            (entity = new GameObject("tree-" + getChunkX() + "," + getChunkZ()).AddComponent <MapEntity> ()).init(this);
        }
        else
        {
            reloadEntity();
        }
    }