def __init__(self, name, x, y, radius, theta): Circle.__init__(self, name, radius, (250, 250, 0), x, y) self.theta = theta self.speed = 20. self.vX = self.speed * cos(self.theta) self.vY = self.speed * sin(self.theta) self.theta = theta
def __init__(self, name, x, y, radius, theta): Circle.__init__(self, name, radius, (250, 250, 0), x, y) self.theta = theta self.speed = 20. self.vX = self.speed * cos(self.theta) self.vY = self.speed * sin(self.theta) self.theta = theta
def __init__(self): (x,y) = random.randint(0, config.SCREEN_X), random.randint(0, config.SCREEN_Y) position = Point(x,y) rand = random.randint(0,255) color = (rand,rand,rand) radius = config.STAR_RADIUS rotation = 0.0 Circle.__init__(self, position, radius, rotation, color)
def __init__(self, pos=None): Circle.__init__(self, C.HOIK_RADIUS, C.HOIK_COLOR, 2) self.velocity = C.HOIK_VELOCITY self.dir = Vector(random.randint(-10, 10),random.randint(-10, 10)).normalized() * self.velocity if pos == None: self.pos = Vector(random.randint(0, C.SCREEN_SIZE.x), random.randint(0, C.SCREEN_SIZE.y)) else: self.pos = pos
def __init__(self): (x, y) = random.randint(0, config.SCREEN_X), random.randint( 0, config.SCREEN_Y) position = Point(x, y) rand = random.randint(0, 255) color = (rand, rand, rand) radius = config.STAR_RADIUS rotation = 0.0 Circle.__init__(self, position, radius, rotation, color)
def __init__(self, x, y, r, port='COM13', baudrate=115200): # parent threading.Thread.__init__(self) # super class constructor self.daemon = True # set to True so that this thread stops when the process stops Circle.__init__(self, -1, x, y, r) # super class constructor self.img = Circle.CIRCLE_IMG_GREY self.portNumber = port self.baudrate = baudrate self.running = True self.ser = None self.startTime = 0 self.connected = False self.color = Tool.COLOR self.target = None # the current target circle self.logging = False self.timingFunc = None self.pedalPressCount = 0
def __init__(self, position, radius, rotation, color): Circle.__init__(self, position, radius, rotation, color) self.set_inactive()
def __init__(self, height, radius, color): Circle.__init__(self, radius, color) self.height = height
def __init__(self): Circle.__init__(self, C.FOOD_RADIUS, C.FOOD_COLOR, None) self.pos = Vector(random.randint(0, C.SCREEN_SIZE.x), random.randint(0, C.SCREEN_SIZE.y))
def __init__(self, position, radius, rotation, color): Circle.__init__(self, position, radius, rotation, color) self.set_inactive()
def __init__(self, x, y, connection): Circle.__init__(self, x, y, 100) self.connection = connection
def __init__(self): Circle.__init__(self, C.BOID_RADIUS, C.BOID_COLOR, None) self.pos = Vector(random.randint(0, C.SCREEN.get_width()), random.randint(0, C.SCREEN.get_height())) self.velocity = C.BOID_VELOCITY self.dir = Vector(random.randint(-10, 10),random.randint(-10, 10)).normalized() * self.velocity
def __init__(self): radius = random.randint(C.OBSTACLE_RADIUS_MIN, C.OBSTACLE_RADIUS_MAX) Circle.__init__(self, radius, C.OBSTACLE_COLOR, None) self.pos = Vector(random.randint(0, C.SCREEN_SIZE.x), random.randint(0, C.SCREEN_SIZE.y))