def __init__(self): Executer.__init__(self) self.circles = {} self.segments = {} self.lock = threading.Lock()
def __init__(self, *, engine, canal_asserv, canal_others, canal_visio, canal_extras, team, posinit, mass, poly_points, typerobot, extension_objects=[]): color = 'blue' if team == BLUE else 'red' EngineObjectPoly.__init__(self, engine = engine, colltype = COLLTYPE_ROBOT, mass = mass, posinit = posinit, color = color, poly_points = poly_points, extension_objects = extension_objects ) Executer.__init__(self) self.typerobot = typerobot # quand on clique ça téléporte au lieu d'envoyer un ordre à l'asservissement self.mod_teleport = False # marche arrière ou marche avant ? self.mod_recul = False # vitesse maximale (quand pwm=255) self.max_speed = 1000 # team self.team = team # les goals self.goals = [] self.stop = False # touche shift enfoncée ? self.current_robot = BIG self.current_team = BLUE self.stop = False # être sûr que le canal commance par # self.canal_asserv = canal_ircnormalize(canal_asserv) self.canal_others = canal_ircnormalize(canal_others) self.canal_extras = canal_ircnormalize(canal_extras) self.canal_visio = canal_ircnormalize(canal_visio) # rajouts des fonctions utilisées par le bot irc # _cmd_asserv_<cmd> => cmd_<canal_asserv>_<cmd> self.transform("asserv", canal_asserv) self.transform("others", canal_others) self.transform("visio", canal_visio) self.transform("extras", canal_extras) self.body._set_velocity_func(self._my_velocity_func()) self.state_jack = 0 # jack in
def __init__(self, canal, robots): Executer.__init__(self) self.canal = canal self.robots = robots