public void Update(int dt = 1) { HeadSprite.Update(dt); BodySprite.Update(dt); BodyRotateSprite.Update(dt); TailSprite.Update(dt); }
public void DrawIcon(SpriteBatch spriteBatch, Vector2 screenPos, Vector2 targetAreaSize) { if (HeadSprite != null) { float scale = Math.Min(targetAreaSize.X / HeadSprite.size.X, targetAreaSize.Y / HeadSprite.size.Y); HeadSprite.Draw(spriteBatch, screenPos, scale: scale); if (AttachmentSprites != null) { float depthStep = 0.000001f; foreach (var attachment in AttachmentSprites) { DrawAttachmentSprite(spriteBatch, attachment, HeadSprite, screenPos, scale, depthStep); depthStep += depthStep; } } } }