public virtual void Draw(Microsoft.Xna.Framework.GameTime gameTime, IEntity entity, int x, int y, float scale, TakaGUI.Services.IRender render) { }
public override void Draw(Microsoft.Xna.Framework.GameTime gameTime, IEntity entity, int x, int y, float scale, TakaGUI.Services.IRender render) { int radius = (int)Math.Round(entity.Radius * scale, 0); var destRect = new Rectangle(x, y, radius * 2, radius * 2); render.DrawSprite(Texture, destRect, new Vector2(Texture.Width / 2, Texture.Height / 2), entity.EntityColor, (float)entity.Rotation); }
public override void Draw(Microsoft.Xna.Framework.GameTime gameTime, IEntity entity, int x, int y, float scale, TakaGUI.Services.IRender render) { if (!animationPacks.ContainsKey(entity.ID)) { setUpPack(entity); } var pack = animationPacks[entity.ID]; pack.Draw(render, new Vector2(x, y) - new Vector2(pack.Width / 2, pack.Height / 2)); }