mover init in MovingEffect
This commit is contained in:
parent
851cba85cb
commit
54b825c7cb
8 changed files with 2 additions and 7 deletions
|
@ -44,7 +44,6 @@ class BouncingSpot(MovingEffect):
|
|||
*groups
|
||||
)
|
||||
self.bounds = bounds
|
||||
next(self.mover)
|
||||
self.update(is_beat=False)
|
||||
|
||||
def update(self, *args: Any, **kwargs: Any) -> None:
|
||||
|
|
|
@ -109,7 +109,7 @@ class CrazyPolys(Effect):
|
|||
self.color if isinstance(self.color, pg.Color) else next(self.color),
|
||||
self.cursor,
|
||||
new_cursor,
|
||||
width=10,
|
||||
width=30,
|
||||
)
|
||||
self.cursor = new_cursor
|
||||
|
||||
|
|
|
@ -26,3 +26,4 @@ class MovingEffect(Effect):
|
|||
) -> None:
|
||||
super().__init__(image, rect, *groups)
|
||||
self.mover = mover or transform_static(rect.center)
|
||||
next(self.mover)
|
||||
|
|
|
@ -55,7 +55,6 @@ class Moonflower(MovingEffect):
|
|||
*groups,
|
||||
)
|
||||
self.bounds = bounds
|
||||
next(self.mover)
|
||||
self.o_color = (
|
||||
self.colors[0]
|
||||
if isinstance(self.colors[0], pg.Color)
|
||||
|
|
|
@ -30,7 +30,6 @@ class MovingWave(MovingEffect):
|
|||
self.wave_height = wave_height or bounds.height
|
||||
self.bounds = bounds
|
||||
self.scroll_speed = scroll_speed
|
||||
next(self.mover)
|
||||
|
||||
self.rainbow = pg.Surface((bounds.width, self.wave_height))
|
||||
rainbow_surface(self.rainbow, "h", hue, color_inc)
|
||||
|
|
|
@ -29,7 +29,6 @@ class RainbowWave(MovingEffect):
|
|||
self.wave_height = wave_height or bounds.height
|
||||
self.bounds = bounds
|
||||
self.scroll_speed = scroll_speed
|
||||
next(self.mover)
|
||||
|
||||
self.rainbow = pg.Surface((bounds.width, self.wave_height))
|
||||
rainbow_surface(self.rainbow, "h", hue, color_inc)
|
||||
|
|
|
@ -24,7 +24,6 @@ class ScanReticle(MovingEffect):
|
|||
image.fill(Colors.Black)
|
||||
image.set_colorkey(Colors.Black)
|
||||
super().__init__(image, bounds, mover, *groups)
|
||||
next(self.mover)
|
||||
self.update(is_beat=False)
|
||||
|
||||
def update(self, *args: Any, **kwargs: Any) -> None:
|
||||
|
|
|
@ -60,7 +60,6 @@ class Spiro(MovingEffect):
|
|||
*groups,
|
||||
)
|
||||
self.bounds = bounds
|
||||
next(self.mover)
|
||||
|
||||
self.cursor = self.calc_pos()
|
||||
self.update(is_beat=False)
|
||||
|
|
Loading…
Reference in a new issue