import pymunk
import pymunk.pygame_util
import pygame.display
+import pygame.transform
from .loader import loader
from .constants import TURNIP_CATEGORY, LIGHT_CATEGORY
self._age = kwargs.get('age', 0)
self._pos = kwargs.get('pos', (0, 0))
space = kwargs.get('space', None)
+ self._rotation = 90 * (hash(self._pos) % 4)
self._update_image()
self.eaten = False # Flag for boyd
self._body = pymunk.Body(0, 0, pymunk.Body.STATIC)
def _update_image(self):
self._image = loader.load_image('32', 'turnip%d.png' % (self._age + 1))
+ self._image = pygame.transform.rotate(self._image, self._rotation)
def render(self, surface):
surface.blit(self._image, self._pos, None)