+ def load_font(self, *parts, **kwargs):
+ """Return a pygame font of the given size"""
+ size = kwargs.get('size', 12)
+ fn = self.full_path("fonts", *parts)
+ font = pygame.font.Font(fn, size)
+ # Do we need to cache this?
+ return font
+
+ def load_sound(self, *parts):
+ """Return a pygame sound"""
+ fn = self.full_path("sounds", *parts)
+ sound = self._cache.get(fn, None)
+ if not sound:
+ sound = pygame.mixer.Sound(fn)
+ self._cache[fn] = sound
+ return sound
+