from .observer import Observer
class Entity(Observer):
def __init__(self):
super().__init__()
self._components = []
self.x = 0
self.y = 0
self.script = None
def add(self, component):
self._components.append(component)
def register(self):
for component in self._components:
component.register()
def unregister(self):
component.unregister()