This repository has been archived on 2019-12-09. You can view files and clone it, but cannot push or open issues or pull requests.
pacman2/engine/components/sprite.py

17 lines
405 B
Python
Raw Normal View History

2019-11-23 10:46:25 +01:00
from .component import Component
from ..servers.graphics import GraphicsServer
class Sprite(Component):
def __init__(self, surf, z):
super().__init__()
self.surf = surf
self.width = self.surf.get_width()
self.z = z
def register(self):
GraphicsServer().register_component(self)
def unregister(self):
GraphicsServer().register_component(self)