Example #1
0
        public void stepDoc(float dt, ACView pactiveview) //Called by Framework.  It calls
                                                          // _pgame.step and ACView.OnDraw
        {
            _dt = dt;
            _pgame.step(dt, pactiveview); /* Move the critters and maybe add or
                                           * delete some. Critters possibly use the pview to sniff out the pixel color at some locations. */
            pactiveview.OnDraw();         // sets up drawings for everything in the game
            //Possibly wait for user to start or restart game.
            bool didareset = false;

            if (_pgame.NewGame)
            {
                string msg = "*Objective: Defeat all bosses to win." +
                             "\n *Controls:" +
                             "\n - W = jump" +
                             "\n - A = move left" +
                             "\n - S = crouch" +
                             "\n - D = move right" +
                             "\n - L = toggle invincibility" +
                             "\n - [SpaceBar] , click = shoot" +
                             "\n*Hint: Remember to pick up the medpacks!" +
                             "\nPress Enter\nTo Start Game";
                MessageBox.Show(msg);
                //MessageBox.Show("PRESS ENTER\nTo Start Game.");
                RESTART = true;
                _pgame.start();
                didareset = true;
            }
            if (didareset && _pgame.Player.Listener.IsKindOf("cListenerCursor"))
            {
                pactiveview.setCursorPosToCritter(_pgame.Player); // Match cursor to player pos.
            }
        }
Example #2
0
        public void stepDoc(float dt, ACView pactiveview) //Called by Framework.  It calls
                                                          // _pgame.step and ACView.OnDraw
        {
            _dt = dt;
            _pgame.step(dt, pactiveview); /* Move the critters and maybe add or
                                           * delete some. Critters possibly use the pview to sniff out the pixel color at some locations. */
            pactiveview.OnDraw();         // sets up drawings for everything in the game
            //Possibly wait for user to start or restart game.
            bool didareset = false;

            if (_pgame.NewGame)
            {
                MessageBox.Show("PRESS ENTER To Start Game\nWASD to move\nSpacebar to jump\nAlt to shoot\nCtrl to punch\nThe powerup at the start is the cheat\nThere are additional powerups throughout the levels");
                RESTART = true;
                _pgame.start();
                didareset = true;
            }
            if (didareset && _pgame.Player.Listener.IsKindOf("cListenerCursor"))
            {
                pactiveview.setCursorPosToCritter(_pgame.Player); // Match cursor to player pos.
            }
        }
        public void stepDoc(float dt, ACView pactiveview) //Called by Framework.  It calls
                                                          // _pgame.step and ACView.OnDraw
        {
            _dt = dt;
            _pgame.step(dt, pactiveview); /* Move the critters and maybe add or
                                           * delete some. Critters possibly use the pview to sniff out the pixel color at some locations. */
            pactiveview.OnDraw();         // sets up drawings for everything in the game
            //Possibly wait for user to start or restart game.
            bool didareset = false;

            if (_pgame.NewGame)
            {
                MessageBox.Show("PRESS ENTER\nTo Start Game.");
                RESTART = true;
                _pgame.start();
                didareset = true;
            }
            if (didareset && _pgame.Player.Listener is cListenerCursor)
            {
                pactiveview.setCursorPosToCritter(_pgame.Player); // Match cursor to player pos.
            }
        }