Esempio n. 1
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, BlendState.AlphaBlend);
            if (GameEnabled)
            {
                spriteBatch.Draw(myMap.Img, myMap.whereToDraw(mainPlayer.Position), null, Color.White, myMap.Angle, new Vector2(300, 300), 0.72f, SpriteEffects.None, 0);
            }
            spriteBatch.FillRectangle(new Rectangle(Mouse.GetState().X, Mouse.GetState().Y, 5, 5), Color.Red);

            if (GameEnabled)
            {
                foreach (WoWUnit rp in allUnits)
                {
                    rp.RUnit.DrawObject(spriteBatch);
                }
                foreach (WoWPlayer rp in allPlayers)
                {
                    rp.RPlayer.DrawObject(spriteBatch);
                }
                foreach (WoWSpell rs in allSpells)
                {
                    rs.RSpell.DrawObject(spriteBatch);
                }
                radarctrl.DrawSelectBox(spriteBatch);
            }
            spriteBatch.End();
            base.Draw(gameTime);
        }
Esempio n. 2
0
 public virtual void DrawObject(ExtendedSpriteBatch myBatch)
 {
     SetAbsoluteRadarPos(myBatch.GraphicsDevice.Viewport.Width, myBatch.GraphicsDevice.Viewport.Height);
     if (this.texture != null)
     {
         myBatch.Draw(this.texture, this.AbsoluteRadarPos, null, Color.Brown, RadarRot, new Vector2(this.texture.Width / 2, this.texture.Height / 2), 0.08f, SpriteEffects.None, 0f);
     }
 }
Esempio n. 3
0
 public override void DrawObject(ExtendedSpriteBatch myBatch)
 {
     SetAbsoluteRadarPos(myBatch.GraphicsDevice.Viewport.Width, myBatch.GraphicsDevice.Viewport.Height);
     if (this.texture != null)
     {
         myBatch.Draw(this.texture, this.AbsoluteRadarPos, null, Color.DarkRed, RadarRot, new Vector2(this.texture.Width / 2, this.texture.Height / 2), 0.005f * radius * RadarObject.RadarZoom, SpriteEffects.None, 0f);
     }
 }
Esempio n. 4
0
 public override void DrawObject(ExtendedSpriteBatch myBatch)
 {
     SetAbsoluteRadarPos(myBatch.GraphicsDevice.Viewport.Width, myBatch.GraphicsDevice.Viewport.Height);
     if (this.texture != null)
     {
         myBatch.Draw(this.texture, this.AbsoluteRadarPos, null, this.drawColor, RadarRot, new Vector2(this.texture.Width / 2, this.texture.Height / 2), 0.08f, SpriteEffects.None, 0f);
         if (selected)
         {
             myBatch.DrawRectangle(new Rectangle((int)this.AbsoluteRadarPos.X - 15, (int)this.AbsoluteRadarPos.Y - 15, 30, 30), Color.Chartreuse);
         }
     }
 }