def handlePause(self, canvas, paused): if not paused: return self.pauseCounter += 0.1 self.pauseCounter %= 100 canvas.draw_circle( (WIDTH / 2, HEIGHT / 2), Util.toRange(math.sin(self.pauseCounter), -1, 1, 0, 100), 1, simpleguiUtils.hsla( 211, 100, 62, Util.toRange(math.sin(self.pauseCounter), -1, 1, 0, 100) / 100), simpleguiUtils.hsla( 211, 100, 62, Util.toRange(math.sin(self.pauseCounter), -1, 1, 0, 100) / 100))
def update(self): self.counter += 0.1 self.counter %= 100 self.lineThickness = int( Util.toRange(math.sin(self.counter), -1, 1, 1, 3)) self.lineColor = simplegui.hsla( 0, 100, 100, Util.toRange(math.sin(self.counter), -1, 1, 0.0, 1.0))
def __init__(self, pos, angle): self.pos = pos self.angle = angle self.alpha = 1.0 self.brightness = 100 self.ceiling = 0.94 self.colour = simpleguiUtils.hsla(170, 100, 90, self.alpha)
def update(self): self.rad += 0.5 self.alpha -= 0.02 if (not self.alpha <= 0): self.colour = simpleguitools.hsla(self.hue, self.saturation, self.brightness, self.alpha)
def decreaseAlpha(self): self.alpha -= 0.02 if (not self.alpha <= 0): self.color = simplegui.hsla(self.hue, self.saturation, self.brightness, self.alpha)
def decreaseAlpha(self): self.alpha -= 0.02 self.brightness -= 1 if (self.alpha > 0.02): self.colour = simpleguiUtils.hsla(170, 100, self.brightness, self.alpha)