Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     Server.__init__(self, *args, **kwargs)
     self.id_inc = 0
     
     self.clients = []
     self.entities = []
     
     # Entities that can be hit.
     self.collided = []
     
     # Entites that hit.
     self.colliders = []
     
     # Static Objects in space.
     # Functions for the entities.
     self.functions = {
         'new_id': self.get_id,
         'add_entity': self.add_entity,
         'remove_entity': self.remove_entity,
         'system_size': SYSTEM_SIZE,
     }
     
     # A Planet to respawn at:
     planet = Entity(self.functions)
     planet.type = 'planet'
     self.entities.append(planet)