예제 #1
0
    public void Regenerate()
    {
        Debug.Log("[REGENERATE] " + gameObject.transform.parent.name);

        PlanetGenerationData PGDDatas = new PlanetGenerationData()
        {
            PGDMapSize  = profile.TexturesSize,
            PGDProfile  = this.profile,
            PGDCallback = (Texture2D GeneratedTex) =>
            {
                ColorMap = new Texture2D(
                    profile.TexturesSize,
                    (int)(profile.TexturesSize / 2f));
                ColorMap.SetPixels(GeneratedTex.GetPixels());
                ColorMap.Apply();

                SetGroundActive(profile.UseGround);

                if (profile.UseGround)
                {
                    ReScale();
                    SetGroundMaterialValues();
                }

                HandleWater();
                HandleClouds();
                HandleAura();
            }
        };

        CustomPerlinGenerator.Instance.Generate(PGDDatas);
    }
예제 #2
0
    public void Generate(PlanetGenerationData datas)
    {
        mapSize = datas.PGDMapSize;

        colorGrad = datas.PGDProfile.ColorGradient;

        Generate(datas.PGDProfile);

        // End
        datas.PGDCallback(ColorMap);
    }