Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions arcade/sprite/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BasicSprite:
def __init__(
self,
texture: Texture,
scale: float = 1.0,
scale: float | Point2 = 1.0,
center_x: float = 0,
center_y: float = 0,
visible: bool = True,
Expand All @@ -67,9 +67,9 @@ def __init__(
self._depth = 0.0
self._texture = texture
width, height = texture.size
self._width = width * scale
self._height = height * scale
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]
self._visible = bool(visible)
self._color: Color = WHITE
self.sprite_lists: list["SpriteList"] = []
Expand Down