コード例 #1
0
ファイル: MainGame.cs プロジェクト: szlatyka/Sharpex2D
        /// <summary>
        ///     Renders the game.
        /// </summary>
        /// <param name="renderer">The Renderer.</param>
        /// <param name="gameTime">The GameTime.</param>
        public override void OnRendering(RenderDevice renderer, GameTime gameTime)
        {
            renderer.Begin();
            DrawBackground(renderer);
            DrawRenderHint(renderer);
            if (_gameStarted)
            {
                DrawPipes(renderer);
                DrawPlayer(renderer);
                DrawScore(renderer);
            }

            if (!_gameStarted || _isDead)
            {
                _instructions.InstructionFlag = _isDead;
                DrawInstructions(renderer);
            }

            renderer.End();
        }
コード例 #2
0
ファイル: MainGame.cs プロジェクト: ThuCommix/Sharpex2D
        /// <summary>
        ///     Renders the game.
        /// </summary>
        /// <param name="renderer">The Renderer.</param>
        /// <param name="gameTime">The GameTime.</param>
        public override void OnRendering(RenderDevice renderer, GameTime gameTime)
        {
            renderer.Begin();
            DrawBackground(renderer);
            DrawRenderHint(renderer);
            if (_gameStarted)
            {
                DrawPipes(renderer);
                DrawPlayer(renderer);
                DrawScore(renderer);
            }

            if (!_gameStarted || _isDead)
            {
                _instructions.InstructionFlag = _isDead;
                DrawInstructions(renderer);
            }

            renderer.End();
        }