def __init__(self): super(_GameClient, self).__init__(fullscreen=True) synthesize(self, 'gameFolder', None) synthesize(self, 'gameWorld', None) synthesize(self, 'showStats', False) synthesize(self, 'isAlive', True) synthesize(self, 'fps', clock.ClockDisplay(), True)
def __init__(self): super(World, self).__init__() synthesize(self, 'Delta', 0) synthesize(self, 'managerQueue', []) #This should get moved a configuration somehow self.addManager(TagManager, priority=-4) self.addManager(GroupManager, priority=-3) self.addManager(SystemManager, priority=-2) self.addManager(EntityManager, priority=-1)
def __init__(self, world=None): super(EntityProxy, self).__init__(world=world) synthesize(self, 'id', 0) synthesize(self, 'oldCls', None) synthesize(self, 'compBits', 0) #we cache these off to make accessing these speedier #synthesize(self, 'ComponentManager', world.ComponentManager) synthesize(self, 'GroupManager', world.GroupManager) synthesize(self, 'TagManager', world.TagManager)
def __init__(self, *components): synthesize(self, 'world', None) synthesize(self, 'systemBit', 0) synthesize(self, 'typeFlags', 0) synthesize(self, 'actives', {}) synthesize(self, 'enabled', True) for comp in components: self.addComponentType(comp)
def __init__(self, **kwds): super(EntityManager, self).__init__(**kwds) #List of the avaible entities, so we can reuse them synthesize(self, 'entityCache', list()) #This is the nextId to append to the Entity class name if we need to create a new entity #Otherwise we just reuse them synthesize(self, 'nextId', 0) #This is the bit mask for all the active entities synthesize(self, 'entityMask', 0) #We don't deactive an entity untill the next update frame synthesize(self, 'deactivateQueue', set())
def __init__(self, priority=0, world=None): synthesize(self, 'world', world) synthesize(self, 'priority', priority) synthesize(self, 'database', {})
def __init__(self, **kwds): super(SystemManager, self).__init__(**kwds) synthesize(self, 'EntityManager', None)
def __init__(self, **kwds): synthesize(self, 'queue', Queue()) self._stop = Event() Process.__init__(self) System.__init__(self, **kwds)
def __init__(self, **kwds): super(System, self).__init__(**kwds) synthesize(self, 'compBits', 0)
def __init__(self, **kwds): super(ComponentManager, self).__init__(**kwds) synthesize(self, 'deactivateQueue', set())