We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 308509c commit fb28eeaCopy full SHA for fb28eea
arcade/sprite/base.py
@@ -57,7 +57,7 @@ class BasicSprite:
57
def __init__(
58
self,
59
texture: Texture,
60
- scale: float = 1.0,
+ scale: float | Point2 = 1.0,
61
center_x: float = 0,
62
center_y: float = 0,
63
visible: bool = True,
@@ -67,9 +67,9 @@ def __init__(
67
self._depth = 0.0
68
self._texture = texture
69
width, height = texture.size
70
- self._width = width * scale
71
- self._height = height * scale
72
- self._scale = (scale, scale)
+ self._scale = (scale, scale) if isinstance(scale, (float, int)) else scale
+ self._width = width * self._scale[0]
+ self._height = height * self._scale[1]
73
self._visible = bool(visible)
74
self._color: Color = WHITE
75
self.sprite_lists: list["SpriteList"] = []
0 commit comments