예제 #1
0
        protected override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            GraphicsDevice.Clear(Color.CornflowerBlue);

            _guiSystem.Draw(gameTime);
        }
예제 #2
0
 public void Draw(GameTime gameTime, GraphicsDevice graphicsDevice, SpriteBatch spriteBatch, Matrix spriteScale)
 {
     // So we know the screen is rendering
     backgroundManager.Draw(spriteBatch, spriteScale);
     spriteBatch.Begin();
     guiSystem.Draw(spriteBatch);
     spriteBatch.End();
 }
예제 #3
0
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch, Matrix spriteScale)
 {
     backgroundManager.Draw(spriteBatch, spriteScale);
     spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, spriteScale);
     spriteBatch.DrawString(HeaderFont, "Levi Challenge", HeaderPosition, Color.White * 0.6f);
     spriteBatch.DrawString(HUDFont, "Made by Nathan Todd", MadeByPosition, Color.White * 0.6f);
     guiSystem.Draw(spriteBatch);
     spriteBatch.End();
 }
예제 #4
0
        protected override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            _spriteBatch.Begin(transformMatrix: _viewportAdapter.GetScaleMatrix());
            _spriteBatch.Draw(_backgroundTexture, _viewportAdapter.BoundingRectangle, Color.White);
            _spriteBatch.End();

            _guiSystem.Draw(gameTime);
        }
예제 #5
0
        public override void Draw(GameTime gameTime)
        {
            guiSystem.Draw(gameTime);

            textBoxR.Draw(gameTime);
            textBoxG.Draw(gameTime);
            textBoxB.Draw(gameTime);

            base.Draw(gameTime);
        }
예제 #6
0
        public void Draw(GameTime gameTime, GraphicsDevice graphicsDevice, SpriteBatch spriteBatch, Matrix spriteScale)
        {
            // So we know the screen is rendering
            graphicsDevice.Clear(Color.Orange);
            spriteBatch.Begin();
            guiSystem.Draw(spriteBatch);
            spriteBatch.End();

            // Draw Scrollable Lists
            ChallengeSelectionList.Draw(spriteBatch);
        }
예제 #7
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            _fpsCounter.Draw(gameTime);
            Window.Title = $"{_currentDemo?.Name} {_fpsCounter.FramesPerSecond}";

            base.Draw(gameTime);

            _currentDemo?.OnDraw(gameTime);

            _guiSystem.Draw(gameTime);
        }
예제 #8
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.Black);
            spriteBatch.Begin();

            if (trailno > 0)
            {
                if (ballspeed < 2)
                {
                    foreach (Vector2 pos in trail)
                    {
                        spriteBatch.Draw(plain, new Rectangle((int)pos.X, (int)pos.Y, balld, balld), Color.DarkGray);
                    }
                }
                else
                {
                    for (int i = 0; i + 1 < trail.Count; i += 1)
                    {
                        new RectSprite(plain, trail[i].X + balld / 2f, trail[i].Y + balld / 2f, trail[i + 1].X + balld / 2f, trail[i + 1].Y + balld / 2f).Draw(spriteBatch, Color.DarkGray, balld, 1.2f);
                    }
                }
                trail.Add(ballpos);
                if (trail.Count > trailno)
                {
                    trail.RemoveAt(0);
                }
            }

            spriteBatch.Draw(plain, new Rectangle(0, (int)othery, paddlew, paddleh), Color.White);
            spriteBatch.Draw(plain, new Rectangle(GraphicsDevice.Viewport.Width - paddlew, (int)usery, paddlew, paddleh), Color.White);
            string  scoretext  = "" + othersc + " : " + usersc;
            Vector2 scoretextd = font.MeasureString(scoretext);

            spriteBatch.DrawString(font, scoretext, new Vector2((GraphicsDevice.Viewport.Width / 2) - (scoretextd.X / 2), 10), Color.White);

            //ai stuff
            if (drawTraj)
            {
                foreach (Tuple <Vector2, Vector2> seg in ailines)
                {
                    new RectSprite(plain, seg.Item1, seg.Item2).Draw(spriteBatch, Color.Red, 2);
                }
            }

            spriteBatch.Draw(plain, new Rectangle((int)ballpos.X, (int)ballpos.Y, balld, balld), Color.White);
            spriteBatch.End();

            //gui
            _gui.Draw(gameTime);
            base.Draw(gameTime);
        }
예제 #9
0
파일: LobbyScene.cs 프로젝트: mikze/Heads
        internal override void DrawScene(GameTime gameTime)
        {
            if (spriteBatch != null && playerSprite != null && plyerTextureTransform != null)
            {
                spriteBatch?.Begin();
                spriteBatch?.Draw(playerSprite, plyerTextureTransform);
                spriteBatch?.Draw(enemySprite, enemyTextureTransform);
                spriteBatch?.Draw(upArrowSprite, upArrowTransform);
                spriteBatch?.Draw(downArrowSprite, downArrowTransForm);
                spriteBatch?.End();
            }

            _guiSystem.Draw(gameTime);
        }
예제 #10
0
        //private Keys GetKey()
        //{
        // Code to get the key the user is pressing
        //}

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            guiSystem.Draw(spriteBatch);
            spriteBatch.End();
        }
예제 #11
0
 public void Draw(GameTime gameTime)
 {
     guiSystem.Draw(gameTime);
 }
예제 #12
0
 internal override void DrawScene(GameTime gameTime)
 {
     _guiSystem.Draw(gameTime);
 }
예제 #13
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            _guiSystem.Draw(gameTime);
        }
예제 #14
0
 public override void Draw(GameTime gameTime)
 {
     guiSystem.Draw(gameTime);
 }
예제 #15
0
 public void Draw(SpriteBatch spritebatch)
 {
     guiSystem.Draw(spritebatch);
 }