Example #1
0
 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)
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
 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)
Example #5
0
 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)
Example #6
0
    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)
Example #7
0
    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)
Example #8
0
    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)
Example #9
0
 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())
Example #10
0
    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())
Example #11
0
 def __init__(self, priority=0, world=None):
     synthesize(self, 'world', world)
     synthesize(self, 'priority', priority)
     synthesize(self, 'database', {})
Example #12
0
    def __init__(self, **kwds):
        super(SystemManager, self).__init__(**kwds)

        synthesize(self, 'EntityManager', None)
Example #13
0
 def __init__(self, **kwds):
     synthesize(self, 'queue', Queue())
     self._stop = Event()
     Process.__init__(self)
     System.__init__(self, **kwds)
Example #14
0
 def __init__(self, **kwds):
     super(System, self).__init__(**kwds)
     synthesize(self, 'compBits', 0)
Example #15
0
 def __init__(self, priority=0, world=None):
     synthesize(self, 'world', world)
     synthesize(self, 'priority', priority)
     synthesize(self, 'database', {})
 def __init__(self, **kwds):
     super(ComponentManager, self).__init__(**kwds)
     synthesize(self, 'deactivateQueue', set())
Example #17
0
 def __init__(self, **kwds):
     super(ComponentManager, self).__init__(**kwds)
     synthesize(self, 'deactivateQueue', set())
Example #18
0
 def __init__(self, **kwds):
     super(System, self).__init__(**kwds)
     synthesize(self, 'compBits', 0)
Example #19
0
 def __init__(self, **kwds):
     super(SystemManager, self).__init__(**kwds)
     
     synthesize(self, 'EntityManager', None)
Example #20
0
 def __init__(self, **kwds):
     synthesize(self, 'queue', Queue())
     self._stop = Event()
     Process.__init__(self)
     System.__init__(self, **kwds)