示例#1
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     infoPlayerButton.Draw(gameTime, spriteBatch);
 }
示例#2
0
 public void Draw(UberSpriteBatch sprite_batch)
 {
     sprite_batch.Draw(texture, position);
 }
示例#3
0
 public virtual void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     InternalDraw(spriteBatch, Color.White);
 }
示例#4
0
        protected void InternalDraw(UberSpriteBatch spriteBatch, Color color)
        {
            Rectangle source = new Rectangle((int)TextureSize.X * Step, (int)TextureSize.Y * (int)Direction, (int)TextureSize.X, (int)TextureSize.Y);

            spriteBatch.Draw(Texture, Position, source, color);
        }
示例#5
0
 public abstract void Draw(GameTime gameTime, UberSpriteBatch spriteBatch);
示例#6
0
 public virtual void DrawUI(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
 }
示例#7
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
 }
示例#8
0
        public void InternalDraw(UberSpriteBatch spriteBatch, Color color)
        {
            Rectangle source = new Rectangle((int)textureSize.X * step, (int)textureSize.Y, (int)textureSize.X, (int)textureSize.Y);

            spriteBatch.Draw(effect, GameScreen.Camera.MapLocation(position), source, color);
        }
示例#9
0
        public void InternalDraw(UberSpriteBatch spriteBatch, Color color)
        {
            Rectangle source = new Rectangle((int)textureSize.X * step, (int)textureSize.Y, (int)textureSize.X, (int)textureSize.Y);

            spriteBatch.Draw(effect, position, source, color);
        }
示例#10
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     spriteBatch.DrawUI(texture, Bounds);
     Serveur.Draw(gameTime, spriteBatch);
     Client.Draw(gameTime, spriteBatch);
 }
示例#11
0
文件: Spell.cs 项目: wiilinkpds/Wotrn
 public virtual void Draw(UberSpriteBatch spriteBatch, GameTime gameTime)
 {
 }
示例#12
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     launchMainButton.Draw(gameTime, spriteBatch);
     quitGameButton.Draw(gameTime, spriteBatch);
 }
示例#13
0
        public override void DrawUI(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            Vector2 position = new Vector2(MainGame.ScreenX / 2 - TexturesManager.PowerBar.Width / 2,
                                           MainGame.ScreenY - TexturesManager.PowerBar.Height) - new Vector2(0, TexturesManager.Xp.Height);

            // Draw la barre de Vie
            int     size = (int)Life * LifeBarSize / Stats.LifeMax;
            Vector2 pos  = new Vector2(position.X, position.Y - TexturesManager.Life.Height);

            for (int i = 0; i < size; i++)
            {
                spriteBatch.DrawUI(TexturesManager.Life, pos + new Vector2(i, 0), Color.White);
            }
            for (int i = size; i < LifeBarSize; i++)
            {
                spriteBatch.DrawUI(TexturesManager.Life, pos + new Vector2(i, 0), Color.Gray);
            }
            Rectangle bounds = new Rectangle((int)pos.X, (int)pos.Y, LifeBarSize, TexturesManager.Life.Height);

            if (MouseManager.IsInRectangle(bounds))
            {
                spriteBatch.DrawUI(TexturesManager.Level, "Vie : " + (int)Life, pos - new Vector2(0, TexturesManager.Level.MeasureString("Vie : " + Life).Y), Color.Red);
            }

            // Draw la barre de Power
            size = (int)Power * PowerBarSize / Stats.PowerMax;
            pos  = new Vector2(position.X + PowerBarSize, position.Y - TexturesManager.Power.Height);
            for (int i = 0; i < size; i++)
            {
                spriteBatch.DrawUI(TexturesManager.Power, pos + new Vector2(i, 0), Color.White);
            }
            for (int i = size; i < PowerBarSize; i++)
            {
                spriteBatch.DrawUI(TexturesManager.Power, pos + new Vector2(i, 0), Color.Gray);
            }
            bounds = new Rectangle((int)pos.X, (int)pos.Y, PowerBarSize, TexturesManager.Power.Height);
            if (MouseManager.IsInRectangle(bounds))
            {
                spriteBatch.DrawUI(TexturesManager.Level, "Power : " + (int)Power, pos - new Vector2(0, TexturesManager.Level.MeasureString("Power : " + Power).Y), Color.MediumPurple);
            }


            // Draw la barre d'Xp
            size = experience * XpBarSize / ExperienceNeeded;
            for (int i = 0; i < size; i++)
            {
                spriteBatch.DrawUI(TexturesManager.Xp, new Vector2(position.X + i, position.Y + TexturesManager.PowerBar.Height), Color.White);
            }
            for (int i = size; i < XpBarSize; i++)
            {
                spriteBatch.DrawUI(TexturesManager.Xp, new Vector2(position.X + i, position.Y + TexturesManager.PowerBar.Height), (i % 60 == 0 && i != 0) ? Color.Black : Color.Gray);
            }

            // Draw la barre de Sort
            spriteBatch.DrawUI(TexturesManager.PowerBar, position, Color.White);
            position += new Vector2(5, 5);
            Vector2 delta = new Vector2(TexturesManager.PowerBar.Width / 10.0f, 0);

            // Fais clignoter les sorts actifs
            foreach (Spell spell in spells)
            {
                if (!spell.IsActivated || gameTime.TotalGameTime.TotalMilliseconds % 1000 < 500) // Draw si non actif || Draw pendant 500 ms si actif sur 1000 ms
                {
                    spriteBatch.DrawUI(spell.Icon, position);
                }
                position += delta;
            }
        }
示例#14
0
 public static void Draw(UberSpriteBatch spriteBatch)
 {
     spriteBatch.Begin();
     spriteBatch.Draw(CurrentTexture, Position);
     spriteBatch.End();
 }
示例#15
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.DrawUI(texture, position);

            printNext.Draw(gameTime, spriteBatch);
        }