public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(texture, new Vector2(x, y), sourceRectangle: new Rectangle(0, 0, WIDTH, HEIGHT), color: Color.White); if (page.animating) { page.Draw(gameTime, spriteBatch, x, y, Color.White); } else { Skill skill = skills[index]; spriteBatch.Draw(skill.icon, new Vector2(x + ICON_X, y + ICON_Y), Color.White); spriteBatch.Draw(texture, new Vector2(x + ICON_X - 2, y + ICON_Y - 2), sourceRectangle: new Rectangle(0, HEIGHT, FRAME_WIDTH, FRAME_HEIGHT), color: Color.White); // Draw name Toolbox.DrawAlignedString(spriteBatch, skill.name, x + NAME_X, y + NAME_Y, font24, Toolbox.ParseColor("#5e3643ff"), PAGE_WIDTH, AlignType.Center, AlignType.Center); // Draw Consumption Toolbox.DrawAlignedString(spriteBatch, "SP " + skill.manaUsage, x + CONSUMPTION_X, y + CONSUMPTION_Y, font12, Toolbox.ParseColor("#3978a8ff"), PAGE_WIDTH, AlignType.Center, AlignType.Center); // Draw Description Toolbox.DrawAlignedString(spriteBatch, skill.GetDescription(), x + DESCRIPTION_X, y + DESCRIPTION_Y, font12, Toolbox.ParseColor("#5e3643ff"), PAGE_WIDTH, AlignType.Center, AlignType.Left); } spriteBatch.End(); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(background, new Vector2(x, y), Color.White); Toolbox.DrawAlignedString(spriteBatch, "Purify Soul", x + TITLE_X, y + TITLE_Y, font, Color.Black, background.Width, horizontalAlign: AlignType.Center); spriteBatch.End(); base.Draw(gameTime, spriteBatch); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(background, new Vector2(x, y), Color.White); spriteBatch.DrawString(font, hero.name, new Vector2(x + NAME_X, y + NAME_Y), Color.White); hero.sprite.Draw(gameTime, spriteBatch, x + HERO_X, y + HERO_Y, Color.White, index: 0); for (int i = 0; i <= hero.rarity; i++) { spriteBatch.Draw(star, new Vector2(x + STAR_X, y + STAR_Y + STAR_GAP * i), Color.White); } for (int i = 0; i < 5; i++) { if (hero.skills[i] != null) { spriteBatch.Draw(hero.skills[i].icon, new Vector2(x + SKILL_X + SKILL_GAP * i, y + SKILL_Y), Color.White); } } Toolbox.DrawAlignedString(spriteBatch, hero.GetDescription(), x + INFO_X, y + INFO_Y, font, Color.White, INFO_WIDTH); spriteBatch.End(); base.Draw(gameTime, spriteBatch); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.Begin(); Toolbox.DrawAlignedString(spriteBatch, text, x, y, font, color, lineWidth, verticalAlign, horizontalAlign); spriteBatch.End(); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { Toolbox.DrawAlignedString(spriteBatch, damage.ToString(), x, y + animation[index], font, Color.White, Global.Properties.GAME_WIDTH, AlignType.Center, AlignType.Center); }