17 lines
405 B
Python
17 lines
405 B
Python
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)
|