Example #1
0
        public override void Update()
        {
            base.Update();

            if (!Visible || !(Lightness > 0.5))
            {
                return;
            }

            if ((Lightness -= Game.Elapsed) > 0.5)
            {
                Bg.RA = Bg.Ga = Bg.Ba = 2 * Lightness - 1;
                Bg.Rm = 2 * _r * (1 - Lightness);
                Bg.Gm = 2 * _g * (1 - Lightness);
                Bg.Bm = 2 * _b * (1 - Lightness);
            }
            else
            {
                Bg.Hardlight(_r, _g, _b);
            }
        }