示例#1
0
        public void Draw(Renderer renderer)
        {
            renderer.Begin();
            map.Draw(renderer);
            objectManager.Draw(renderer);

            renderer.End();
        }
示例#2
0
 public void Draw(Renderer renderer)
 {
     renderer.Begin();
     renderer.DrawTexture("HK2", Vector2.Zero);
     map.Draw(renderer);
     gameObjectManager.Draw(renderer);
     timerUI.Draw(renderer);
     renderer.End();
 }
示例#3
0
        public void Draw(Renderer renderer)
        {
            renderer.Begin();


            renderer.DrawTexture("backColor", Vector2.Zero);
            gameObjectManager.Draw(renderer);
            renderer.End();
        }
示例#4
0
        public virtual void Draw()
        {
            GameObjectManager.Draw(SpriteBatch);
            GameObjectManager.DrawInGameUI(SpriteBatch);
            InGameUIManager.Draw(SpriteBatch);
            InGameUIManager.DrawInGameUI(SpriteBatch);
            UIManager.DrawInGameUI(SpriteBatch);

            ScriptManager.Draw(SpriteBatch);
        }
示例#5
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            // TODO: Add your drawing code here
            _spriteBatch.Begin();
            gameObjectManager.Draw(gameTime, _spriteBatch, GraphicsDevice);
            _spriteBatch.End();
            base.Draw(gameTime);
        }
示例#6
0
        public void Draw()
        {
            GameDevice.Instance().GetGraphicsDevice().Clear(clock.BackGroundColor);

            Renderer.Instance.Begin();
            Array.ForEach(backGrounds, bg => bg.Draw());
            gameObjectManager.Draw();
            particleManager.Draw();
            fade.Draw();
            uiManager.Draw();
            Renderer.Instance.End();
        }
示例#7
0
        /// <summary>
        /// 描画
        /// </summary>
        /// <param name="renderer">描画オブジェクト</param>
        public void Draw(Renderer renderer)
        {
            renderer.Begin();
            renderer.DrawTexture("black", Vector2.Zero);
            renderer.DrawTexture("block", Vector2.Zero);

            map.Draw(renderer);
            gameObjectManager.Draw(renderer);
            player.Draw(renderer);


            renderer.End();
        }
示例#8
0
        /// <summary>
        /// Draws the gameplay screen.
        /// </summary>
        public override void Draw(GameTime gameTime)
        {
            // This game has a blue background. Why? Because!
            //ScreenManager.GraphicsDevice.Clear(ClearOptions.Target,
            //                                 /*Color.CornflowerBlue*/
            //                               Color.Black, 0, 0);

            // Our player and enemy are both actually just text strings.
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();

            //spriteBatch.DrawString(gameFont, "// TODO", playerPosition, Color.Green);

            /*
             * Color color = new Color(255, 255, 255, 255);
             *
             *
             * int x = (int)playerPosition.X;
             *
             * int i = (x % 20) / 4;
             *
             * Rectangle source = new Rectangle((4-i)*24, (lastMove*24), 24, 24);
             *
             * Rectangle monsterRectangle = new Rectangle((int)playerPosition.X, (int)playerPosition.Y, 48, 48);
             *
             * spriteBatch.Draw(sprite, monsterRectangle, source, color);
             */
            gameObjectManager.Draw(gameTime);

            /*
             * for (int i = 0; i <= 24; i++)
             * {
             *  for (int j = 0; j <= 18; j++)
             *  {
             *      spriteBatch.Draw(sprite, new Vector2(i * 24, j * 24), new Rectangle(450, 40, 1, 1), new Color(255, 255, 255, 255));
             *  }
             * }
             */

            //spriteBatch.DrawString(gameFont, "Insert Gameplay Here", enemyPosition, Color.DarkRed);

            spriteBatch.End();

            // If the game is transitioning on or off, fade it out to black.
            if (TransitionPosition > 0)
            {
                ScreenManager.FadeBackBufferToBlack(255 - TransitionAlpha);
            }
        }
示例#9
0
        public void Draw(SpriteBatch spriteBatch)
        {
            for (int i = 0; i < Tiles.GetLength(0); i++)
            {
                for (int j = 0; j < Tiles.GetLength(1); j++)
                {
                    if (Tiles[i, j] == 1)
                    {
                        spriteBatch.Draw(_wallTexture, new Vector2(16 * j, 16 * i), Color.White);
                    }
                }
            }

            _gameObjectManager.Draw(spriteBatch);
        }
示例#10
0
        /// <summary>
        /// 描画処理
        /// </summary>
        /// <param name="gameTime">現在のゲーム時間を提供するオブジェクト</param>
        protected override void Draw(GameTime gameTime)
        {
            // 画面クリア時の色を設定
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // この下に描画ロジックを記述
            renderer.Begin();

            map.Draw(renderer);
            gameObjectManager.Draw(renderer);

            renderer.End();

            //この上にロジックを記述
            base.Draw(gameTime); // 親クラスの更新処理呼び出し。絶対に消すな!!
        }
示例#11
0
        public void Draw(Game1 game)
        {
            var spriteBatch = game.spriteBatch;

            game.GraphicsDevice.SetRenderTarget(game.nativeRenderTarget);
            game.GraphicsDevice.Clear(Color.CornflowerBlue);
            spriteBatch.Begin(SpriteSortMode.FrontToBack, samplerState: SamplerState.PointClamp);
            gameObjectManager.Draw(spriteBatch);
            ParticlesProcessor.Draw(spriteBatch);
            spriteBatch.End();

            game.GraphicsDevice.SetRenderTarget(null);
            spriteBatch.Begin(samplerState: SamplerState.PointClamp);
            spriteBatch.Draw(game.nativeRenderTarget, new Rectangle(0, 0, Constants.DEFAULT_ZOOMING_MODIFIER * Constants.RESOLUTION_WIDTH, Constants.DEFAULT_ZOOMING_MODIFIER * Constants.RESOLUTION_HEIGHT), Color.White);
            UIProcessor.Draw(spriteBatch, gameObjectManager.unit);
            spriteBatch.End();
        }
示例#12
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        ///
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, camera2.GetViewMatrix(parallax));

            foreach (IGameObject obj in GameObjectManager.cloudList)
            {
                obj.Draw(spriteBatch);
            }
            spriteBatch.End();
            spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, camera1.GetTransform * Matrix.CreateScale(GetScreenScale));
            objectManager.Draw(spriteBatch);
            spriteBatch.End();

            base.Draw(gameTime);
        }
示例#13
0
        public void Draw()
        {
            GameDevice.Instance().GetGraphicsDevice().Clear(Color.Black);

            Renderer.Instance.Begin();
            particleManager.Draw();
            gameObjectManager.Draw();
            if (!fade.IsEnd)
            {
                fade.Draw();
            }
            if (bossAlert.Initialized)
            {
                bossAlert.Draw();
            }
            Renderer.Instance.End();
        }
示例#14
0
        /// <summary>
        /// Draws the background screen.
        /// </summary>
        public override void Draw(GameTime gameTime)
        {
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;
            Viewport    viewport    = ScreenManager.GraphicsDevice.Viewport;
            Rectangle   fullscreen  = new Rectangle(0, 0, viewport.Width, viewport.Height);
            byte        fade        = TransitionAlpha;

            spriteBatch.Begin();//SpriteBlendMode.None);

            spriteBatch.Draw(backgroundTexture, fullscreen,
                             new Color(fade, fade, fade));

            if (demo)
            {
                gameObjectManager.Draw(gameTime);
            }


            spriteBatch.End();
        }
        public void Draw(Renderer renderer)
        {
            renderer.Begin();


            renderer.DrawTexture("backColor", Vector2.Zero);
            gameObjectManager.Draw(renderer);
            if ((int)score / 1000 <= 9 && (int)score / 1000 >= 1)
            {
                renderer.DrawNumber("number", Vector2.Zero, score.ToString("f2"), 7);
            }
            if ((int)score / 100 <= 9 && (int)score / 100 >= 1)
            {
                renderer.DrawNumber("number", Vector2.Zero, score.ToString("f2"), 6);
            }
            if ((int)score / 10 <= 9 && (int)score / 10 >= 1)
            {
                renderer.DrawNumber("number", Vector2.Zero, score.ToString("f2"), 5);
            }
            renderer.DrawNumber("number", Vector2.Zero, score.ToString("f2"), 4);
            renderer.End();
        }
示例#16
0
        public void Draw(Renderer renderer)
        {
            renderer.Begin();
            renderer.DrawTexture("background", Vector2.Zero);
            gameObject.Draw(renderer);
            renderer.DrawTexture("backwind", new Vector2(-15, 904 - 68));
            if (Player.DeadFlag == false)
            {
                //renderer.DrawNumber("number", new Vector2(150, 0), Score);
                renderer.DrawTexture("score", new Vector2(-130, 904 - 64));
                renderer.DrawTexture("highscore", new Vector2(0, 904 - 32));
                renderer.DrawNumber("number", new Vector2(200, 904 - 64), Score);
                renderer.DrawNumber("number", new Vector2(310, 904 - 32), highScore);
            }
            else if (Player.DeadFlag == true)
            {
                renderer.DrawTexture("ScoreBack", new Vector2(Screen.Width / 2 - 420, Screen.Height / 2 - 452));
                renderer.DrawTexture("highscore", new Vector2(90, Screen.Height / 2 + 64));
                renderer.DrawNumber("number", new Vector2(Screen.Width / 2 - 16, Screen.Height / 2 - 16), Score);
                renderer.DrawTexture("score", new Vector2(90, Screen.Height / 2 - 16));
                if (highScore < Score)
                {
                    highScore = Score;
                }
                renderer.DrawNumber("number", new Vector2(Screen.Width / 2 - 16, Screen.Height / 2 + 64), highScore);

                if (Keyboard.GetState().IsKeyDown(Keys.Space))
                {
                    Score        = 0;
                    seconds      = 0;
                    enemy2Count  = 0;
                    enemy2Count2 = 0;
                    isEnd        = true;
                }
            }
            renderer.End();
        }