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/entity.py

19 lines
445 B
Python
Raw Normal View History

2019-11-23 10:46:25 +01:00
class Entity:
def __init__(self):
self._components = []
self.x = 0
self.y = 0
self.script = None
def add(self, component):
self._components.append(component)
component.parent = self
def register(self):
for component in self._components:
component.register()
def unregister(self):
for component in self._components:
component.unregister()