Exemplo n.º 1
0
        static Vegetation()
        {
            Scene.Define("vegetation", typeof(BitmapRenderComponent),
                         typeof(VegetationLifeComponent));

            //Add dead bitmaps
            using (Effect e = new Effect())
            {
                e.AddSaturation(.2f);
                e.Create();

                foreach (var s in new string[] { "v_water", "v_desert", "v_grassland", "v_shrubland", "v_temperatedeciduous" })
                {
                    var b = e.ApplyTo(ResourceManager.Request <BitmapResource>(s));
                    ResourceManager.Add(s + "_dead", b, true);
                }
            }
        }