class Arrow(Sprite):
def __init__(self, parent):
- Sprite.__init__(self, parent)
- w, h = 44, 39
+ Sprite.__init__(self, parent, 360)
+ w, h = 56, 39
surface = Surface((w, h), SRCALPHA)
- points = [[int(round(val)) for val in coordinate] for coordinate in \
- (w * .25, 0), (w * .75, 0), (w * .75, h * .62), \
- (w - 1, h * .62), (w * .5, h - 1), (0, h * .62), \
- (w * .25, h * .62)]
- frame = surface.copy()
- polygon(frame, (255, 192, 85), points)
- self.add_frame(frame)
+ for color in ((255, 255, 0, 200), (0, 255, 255, 200), (255, 0, 255, 200)):
+ frame = surface.copy()
+ for offset in (0, 5):
+ points = [[int(round(val)) for val in coordinate] for
+ coordinate in self.get_coordinates(w - 10, h, offset)]
+ if offset == 5:
+ color = Color(*color)
+ hue, s, l, a = color.hsla
+ color.hsla = (hue + 180) % 360, 50, 100, 100
+ polygon(frame, color, points)
+ self.add_frame(frame)
floor = self.get_game().floor.location
self.location.midbottom = int(floor.w * .75), floor.top - 8
+ def get_coordinates(self, w, h, offset):
+ return (w * .25 + offset, 0), (w * .75 + offset, 0), \
+ (w * .75 + offset, h * .62), (w - 1 + offset, h * .62), \
+ (w * .5 + offset, h - 1), (0 + offset, h * .62), \
+ (w * .25 + offset, h * .62)
+
class Floor(Sprite):