mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
fix backgrounds
This commit is contained in:
@@ -27,15 +27,16 @@ class Background:
|
||||
class BGFever(BGFever4):
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
super().__init__(tex, index, path)
|
||||
self.vertical_move = Animation.create_move(tex.animations[15].duration, total_distance=328)
|
||||
self.width = tex.textures[self.name]['petals'].width
|
||||
self.vertical_move = Animation.create_move(tex.animations[15].duration, total_distance=self.width)
|
||||
self.vertical_move.start()
|
||||
self.vertical_move.loop = True
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, 'overlay')
|
||||
for i in range(10):
|
||||
for i in range(int(10 * tex.screen_scale)):
|
||||
for j in range(2):
|
||||
tex.draw_texture(self.name, 'petals', x=(i * 328)-self.horizontal_move.attribute, y=(j * 328) + self.vertical_move.attribute)
|
||||
tex.draw_texture(self.name, 'petals', x=(i * self.width)-self.horizontal_move.attribute, y=(j * self.width) + self.vertical_move.attribute)
|
||||
|
||||
class DancerGroup(BaseDancerGroup):
|
||||
def __init__(self, tex: TextureWrapper, index: int, bpm: float, max_dancers: int, path: str):
|
||||
@@ -73,9 +74,9 @@ class BGNormal(BGNormal2):
|
||||
class DonBG(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
super().__init__(tex, index, player_num, path)
|
||||
self.move = Animation.create_move(10000, total_distance=-1280)
|
||||
self.move = Animation.create_move(10000, total_distance=-tex.screen_width)
|
||||
self.move.start()
|
||||
self.move.loop = True
|
||||
def _draw_textures(self, tex: TextureWrapper, fade: float, y: float):
|
||||
for i in range(2):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*1280)+self.move.attribute)
|
||||
for i in range(int(2 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*tex.screen_width)+self.move.attribute)
|
||||
|
||||
@@ -22,7 +22,7 @@ class Background:
|
||||
class DonBG(DonBG6):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
super().__init__(tex, index, player_num, path)
|
||||
self.overlay_move_2 = Animation.create_move(8000, total_distance=-760)
|
||||
self.overlay_move_2 = Animation.create_move(8000, total_distance=-tex.textures[self.name]['bg_overlay_2'].width)
|
||||
self.overlay_move_2.loop = True
|
||||
self.overlay_move_2.start()
|
||||
|
||||
@@ -32,12 +32,12 @@ class DonBG(DonBG6):
|
||||
|
||||
def _draw_textures(self, tex: TextureWrapper, fade: float, y: float):
|
||||
tex.draw_texture(self.name, 'background')
|
||||
for i in range(3):
|
||||
tex.draw_texture(self.name, 'bg_overlay', x=(i*464), y=y)
|
||||
for i in range(3):
|
||||
tex.draw_texture(self.name, 'bg_overlay_2', x=(i*760)+(self.overlay_move_2.attribute), y=y)
|
||||
for i in range(0, 6, 2):
|
||||
tex.draw_texture(self.name, 'overlay_1', x=(i*264) + self.move.attribute*3, y=-self.move.attribute*0.85+y)
|
||||
for i in range(int(3 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'bg_overlay', x=(i*tex.textures[self.name]['bg_overlay'].width), y=y)
|
||||
for i in range(int(3 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'bg_overlay_2', x=(i*tex.textures[self.name]['bg_overlay_2'].width)+(self.overlay_move_2.attribute), y=y)
|
||||
for i in range(0, int(6 * tex.screen_scale), int(2 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'overlay_1', x=(i*264 * tex.screen_scale) + self.move.attribute*3, y=-self.move.attribute*0.85+y)
|
||||
tex.draw_texture(self.name, 'bg_overlay_3')
|
||||
for i in range(5):
|
||||
tex.draw_texture(self.name, 'overlay_2', x=(i*328)+self.move.attribute, y=self.overlay_move.attribute+y)
|
||||
for i in range(int(5 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'overlay_2', x=(i*328 * tex.screen_scale)+self.move.attribute, y=self.overlay_move.attribute+y)
|
||||
|
||||
@@ -27,13 +27,13 @@ class Background:
|
||||
class DonBG(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
super().__init__(tex, index, player_num, path)
|
||||
self.move = Animation.create_move(3000, total_distance=-304)
|
||||
self.move = Animation.create_move(3000, total_distance=-tex.textures[self.name]['background'].width)
|
||||
self.move.loop = True
|
||||
self.move.start()
|
||||
|
||||
def _draw_textures(self, tex: TextureWrapper, fade: float, y: float):
|
||||
for i in range(5):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*304)+self.move.attribute, y=y)
|
||||
for i in range(int(5 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['background'].width)+self.move.attribute, y=y)
|
||||
|
||||
class BGNormal(BGNormalBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
|
||||
@@ -40,14 +40,14 @@ class DancerGroup(BaseDancerGroup):
|
||||
class DonBG(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
super().__init__(tex, index, player_num, path)
|
||||
self.move = Animation.create_move(20000, total_distance=-1344)
|
||||
self.move = Animation.create_move(20000, total_distance=-tex.textures[self.name]['background'].width * (tex.screen_scale * 8))
|
||||
self.move.start()
|
||||
self.move.loop = True
|
||||
def _draw_textures(self, tex: TextureWrapper, fade: float, y: float):
|
||||
for i in range(16):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*168)+self.move.attribute, y=y)
|
||||
for i in range(int(16 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['background'].width)+self.move.attribute, y=y)
|
||||
for j in range(3):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*168)+self.move.attribute, y=y+(j*70))
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['background'].width)+self.move.attribute, y=y+(j*70 * tex.screen_scale))
|
||||
|
||||
class BGFever(BGFeverBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
|
||||
Reference in New Issue
Block a user