2021-06-25 14:42:35 +02:00
|
|
|
from gamedata.objects.bg.backgrounddrawer import BackgroundDrawer
|
|
|
|
|
|
|
|
class MovingBackground(BackgroundDrawer):
|
|
|
|
|
|
|
|
def __init__(self,x,y,game,w,h,sprite,ratio,spdx,spdy):
|
|
|
|
super().__init__(x,y,game,w,h,sprite,ratio)
|
|
|
|
self.spdx = spdx
|
|
|
|
self.spdy = spdy
|
|
|
|
|
2021-06-25 16:13:52 +02:00
|
|
|
def step(self):
|
2021-06-25 14:42:35 +02:00
|
|
|
self.rect[0]+=self.spdx
|
|
|
|
self.rect[1]+=self.spdy
|