Exemplo n.º 1
0
        /// <summary>
        /// Render
        /// </summary>
        /// <param name="spriteBatch">sb</param>
        public void render(SpriteBatch spriteBatch)
        {
            _FPS[_curFPS] = (int)(1f / FlxG.elapsed);
            if (++_curFPS >= _FPS.Length)
            {
                _curFPS = 0;
            }
            _fpsUpdate = !_fpsUpdate;
            if (_fpsUpdate)
            {
                int fps = 0;
                for (int i = 0; i < _FPS.Length; i++)
                {
                    fps += _FPS[i];
                }
                _consoleFPS.text = ((int)Math.Floor((double)(fps / _FPS.Length))).ToString() + " fps";
            }

            spriteBatch.Draw(FlxG.XnaSheet, _consoleRect,
                             _srcRect, _consoleColor);

            spriteBatch.Draw(FlxG.XnaSheet, _titleSafeRect,
                             _srcRect, notTitleSafeColor);

            _consoleText.render(spriteBatch);
            _consoleFPS.render(spriteBatch);
            _consoleCommand.render(spriteBatch);
            vcr.render(spriteBatch);
            if (canTypeCheat)
            {
                _consoleCheatActivated.render(spriteBatch);
            }
        }
Exemplo n.º 2
0
        public override void render(SpriteBatch spriteBatch)
        {
            openSprite.render(spriteBatch);
            pauseSprite.render(spriteBatch);
            playSprite.render(spriteBatch);
            recordSprite.render(spriteBatch);
            restartSprite.render(spriteBatch);
            stopSprite.render(spriteBatch);
            infoText.render(spriteBatch);

            base.render(spriteBatch);
        }
Exemplo n.º 3
0
        override public void render(SpriteBatch spriteBatch)
        {
            if (visible)
            {
                if (_border)
                {
                    outline.render(spriteBatch);
                }

                emptyBar.render(spriteBatch);
                filledBar.render(spriteBatch);
                _text.render(spriteBatch);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Render all the elements.
        /// </summary>
        /// <param name="spriteBatch"></param>
        public void render(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(FlxG.XnaSheet, _consoleRect, _srcRect, _consoleColor);

            hudGroup.render(spriteBatch);

            p1HudText.render(spriteBatch);
            p2HudText.render(spriteBatch);
            p3HudText.render(spriteBatch);
            p4HudText.render(spriteBatch);

            keyboardButton.render(spriteBatch);
            ouyaButton.render(spriteBatch);
            xboxButton.render(spriteBatch);

            keyboardDirection.render(spriteBatch);
            ouyaDirection.render(spriteBatch);
            xboxDirection.render(spriteBatch);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Render
 /// </summary>
 /// <param name="spriteBatch"></param>
 override public void render(SpriteBatch spriteBatch)
 {
     base.render(spriteBatch);
     if ((_off != null) && _off.exists && _off.visible)
     {
         _off.render(spriteBatch);
     }
     if ((_on != null) && _on.exists && _on.visible)
     {
         _on.render(spriteBatch);
     }
     if (_offT != null)
     {
         if ((_offT != null) && _offT.exists && _offT.visible)
         {
             _offT.render(spriteBatch);
         }
         if ((_onT != null) && _onT.exists && _onT.visible)
         {
             _onT.render(spriteBatch);
         }
     }
 }
Exemplo n.º 6
0
        private void renderWithOffset(SpriteBatch spriteBatch, FlxSprite obj, float localX, float localY, float localScale)
        {
            float oldX = obj.x;
            float oldY = obj.y;
            float oldScale = obj.scale;
            float oldScrollX = obj.scrollFactor.X;
            float oldScrollY = obj.scrollFactor.Y;

            obj.setScrollFactors(0, 0);
            obj.x = localX;
            obj.y = localY;
            obj.scale = localScale;
            obj.render(spriteBatch);

            obj.setScrollFactors(oldScrollX, oldScrollY);
            obj.x = oldX;
            obj.y = oldY;
            obj.scale = oldScale;
        }