Esempio n. 1
0
        public override void FrameExecute()
        {
            var ctx = MakeCurrentContext();

            pixWindows.Write(fxWindows.Execute(ctx));
            pixRoof.Write(fxAll.Execute(ctx));
        }
Esempio n. 2
0
 public override void FrameExecute()
 {
     if (mColourMode)
     {
         PixelMap.Write(mFxRainbow.Execute(MakeCurrentContext()));
     }
     else
     {
         PixelMap.Write(mFxTwinkle.Execute(MakeCurrentContext()));
     }
 }
Esempio n. 3
0
        public override void FrameExecute()
        {
            var ctx = MakeCurrentContext();

            mMapPerimeter.Write(mFxPerimeter.Execute(ctx));
            if (TimeSpan.Zero == mWindow.CometTimeStart)
            {
                // comets reset
                mWindow.CometTimeStart = CurrentTime;
            }
            var comettime = CurrentTime - mWindow.CometTimeStart;

            if (comettime < CometTimeMax)
            {
                // comets animating
                var cctx = new FxContextSimple(comettime);
                mEdgeLeft.Write(mFxCometLeft.Execute(cctx));
                mEdgeRight.Write(mFxCometRight.Execute(cctx));
            }
        }
Esempio n. 4
0
        public override void FrameExecute()
        {
            var ctx = MakeCurrentContext();

            mFxPerimeterRainbow.Luminance  = PerimeterLuminanceMultiplier;
            mFxPerimeterRainbow.Saturation = Saturation.Value;
            mPixelMapPerimeter.Write(mFxPerimeterRainbow.Execute(ctx));
            mFxStarlight.Luminance = LuminanceStarlightMultiplier;
            mPixelMapStars.Write(mFxStarlight.Execute(ctx));

            mGlimRedGun.WriteExecute(ctx);
            mGlimBlueGun.WriteExecute(ctx);
            if (null != mFxBarrel && mFxBarrel.IsRunning)
            {
                mPixelMapBarrel.Write(mFxBarrel.Execute(ctx));
            }
            switch (mGameState)
            {
            case GameState.Null:
            case GameState.SynchronizedShotsFired:
                return;
            }
            double lumscale = 0.0;

            if (GameState.CoolDown == mGameState)
            {
                mPixelMapBarrel.Write(BarrelColour());
                mPixelMapStars.Write(mFxCannonTwinkle.Execute(ctx));
                // take 2 seconds to return to full glow
                lumscale = ((CurrentTime - mGameCoolDownStart).TotalSeconds - 1) / 2;
            }
            if (lumscale < 1)
            {
                // barrel shot or cooling down
            }
            else
            {
                mGameState = GameState.Null;
                RecalculateButtonGlimmer(mGlimBlueGun);
                RecalculateButtonGlimmer(mGlimRedGun);
            }
            switch (mGameState)
            {
            case GameState.BarrelShotFired:
                if (!mFxBarrel.IsRunning)
                {
                    mGameState         = GameState.CoolDown;
                    mGameCoolDownStart = CurrentTime;
                    mFxBarrel          = null;
                }
                break;

            case GameState.SynchronizedShotsFired:
                if (!mGlimBlueGun.CometIsRunning || !mGlimRedGun.CometIsRunning)
                {
                    mGameState = GameState.BarrelShotFired;
                    mFxBarrel  = new FxComet {
                        BaseColor = Color.FromArgb(0xff, 0, 0xff), PixelCount = 50
                    };
                }
                break;
            }
        }
Esempio n. 5
0
        public override void FrameExecute()
        {
            var ctx = MakeCurrentContext();

            PixelMap.Write(mFxRainbowCycle.Execute(ctx));
        }