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
421 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, parent, surf, z):
super().__init__(parent)
2019-11-23 10:46:25 +01:00
self.surf = surf
self.width = self.surf.get_width()
self.z = z
def register(self):
GraphicsServer().register_component(self)
def unregister(self):
2019-12-08 23:47:32 +01:00
GraphicsServer().unregister_component(self)