Beispiel #1
0
        DetailPrototype GetDetail(string dir, Grass grass)
        {
            DetailPrototype detail = new DetailPrototype();

            if (grass == null)
            {
                return(detail);
            }

            detail.maxHeight        = grass.maxHeight;
            detail.minHeight        = grass.minHeight;
            detail.minWidth         = Config.GrassWidth;
            detail.maxWidth         = Config.GrassWidth;
            detail.prototypeTexture = Util.Storage.LoadTextureFromResources(dir + grass.file);
            detail.noiseSpread      = 0.1f;
            detail.dryColor         = grass.dry;
            detail.healthyColor     = grass.healthy;
            detail.renderMode       = DetailRenderMode.GrassBillboard;
            return(detail);
        }
Beispiel #2
0
        DetailPrototype GetDetail(string dir, Grass grass)
        {
            DetailPrototype detail = new DetailPrototype();
            if (grass==null) return detail;

            detail.maxHeight = grass.maxHeight;
            detail.minHeight = grass.minHeight;
            detail.minWidth = Config.GrassWidth;
            detail.maxWidth = Config.GrassWidth;
            detail.prototypeTexture = Util.Storage.LoadTextureFromResources(dir + grass.file);
            detail.noiseSpread = 0.1f;
            detail.dryColor = grass.dry;
            detail.healthyColor = grass.healthy;
            detail.renderMode = DetailRenderMode.GrassBillboard;
            return detail;
        }