public static Image avatar(HeroClass cl, int armorTier) { RectF patch = tiers().get(armorTier); Image avatar = new Image(cl.spritesheet()); RectF frame = avatar.texture.uvRect(1, 0, FRAME_WIDTH, FRAME_HEIGHT); frame = frame.offset(patch.left, patch.top); avatar.frame(frame); return avatar; }
public float height(RectF rect) { return rect.height() * tx.height; }
public float width(RectF rect) { return rect.width() * tx.width; }