public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { infoPlayerButton.Draw(gameTime, spriteBatch); }
public void Draw(UberSpriteBatch sprite_batch) { sprite_batch.Draw(texture, position); }
public virtual void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { InternalDraw(spriteBatch, Color.White); }
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); }
public abstract void Draw(GameTime gameTime, UberSpriteBatch spriteBatch);
public virtual void DrawUI(GameTime gameTime, UberSpriteBatch spriteBatch) { }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { }
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); }
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); }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.DrawUI(texture, Bounds); Serveur.Draw(gameTime, spriteBatch); Client.Draw(gameTime, spriteBatch); }
public virtual void Draw(UberSpriteBatch spriteBatch, GameTime gameTime) { }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { launchMainButton.Draw(gameTime, spriteBatch); quitGameButton.Draw(gameTime, spriteBatch); }
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; } }
public static void Draw(UberSpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(CurrentTexture, Position); spriteBatch.End(); }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.DrawUI(texture, position); printNext.Draw(gameTime, spriteBatch); }