x, y = self.get_position() #print x if 50 > x > 45: print 'change' self.set_background(color=RED) class C2(Circle): def move(self): x, y = self.get_position() #print 'moving', x, y Circle.move(self) game = Game() layer = game.addLayer(size=(500, 500)) #print 1 layer.center() #print 1 layer.set_background(color=BLUE) layer.border(10) #layer.path.set_velocity(vx=10, vy=10) path = CirclePath() path.set_loop(-1) layer.set_path(path) game.sprites.add(layer, level=1) circle = C2(layer, color=GREEN) #print 2