from pgzero.actor import POS_TOPLEFT, ANCHOR_CENTER
from .surf import SurfActor
+from ..constants import TILE_SIZE
class OrientatedSurfActor(SurfActor):
@angle.setter
def angle(self, angle):
+ cur_anchor = self._anchor_value
+ if angle not in (self._angle, self._angle + 180, self._angle - 180):
+ self._anchor_value = (cur_anchor[1], cur_anchor[0])
self._angle = angle
self._surf = self._orig_surf = rotate(self._base_surf, angle)
+ print(self.anchor, self.angle)
@property
def surf(self):