mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
player number enum
This commit is contained in:
@@ -6,12 +6,13 @@ from libs.bg_objects.chibi import ChibiController
|
||||
from libs.bg_objects.dancer import BaseDancerGroup
|
||||
from libs.bg_objects.footer import Footer
|
||||
from libs.bg_objects.renda import RendaController
|
||||
from libs.global_data import PlayerNum
|
||||
from libs.texture import TextureWrapper
|
||||
from libs.bg_objects.don_bg import DonBGBase
|
||||
|
||||
|
||||
class Background:
|
||||
def __init__(self, tex: TextureWrapper, player_num: int, bpm: float, path: str, max_dancers: int):
|
||||
def __init__(self, tex: TextureWrapper, player_num: PlayerNum, bpm: float, path: str, max_dancers: int):
|
||||
self.tex_wrapper = tex
|
||||
self.max_dancers = max_dancers
|
||||
self.don_bg = DonBG(self.tex_wrapper, 0, player_num, path)
|
||||
@@ -24,7 +25,7 @@ class Background:
|
||||
self.chibi = ChibiController(self.tex_wrapper, 0, bpm, path)
|
||||
|
||||
class DonBG(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: int, path: str):
|
||||
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.loop = True
|
||||
@@ -35,8 +36,8 @@ class DonBG(DonBGBase):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*304)+self.move.attribute, y=y)
|
||||
|
||||
class BGNormal(BGNormalBase):
|
||||
def __init__(self, tex: TextureWrapper, player_num: int, path: str):
|
||||
super().__init__(tex, player_num, path)
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
super().__init__(tex, index, path)
|
||||
self.screen_change = Animation.create_texture_change(8000, textures=[(0, 2000, 0), (2000, 4000, 1), (4000, 6000, 2), (6000, 8000, 3)])
|
||||
self.screen_change.loop = True
|
||||
self.screen_change.start()
|
||||
@@ -51,8 +52,8 @@ class BGNormal(BGNormalBase):
|
||||
tex.draw_texture(self.name, 'overlay')
|
||||
|
||||
class BGFever(BGFeverBase):
|
||||
def __init__(self, tex: TextureWrapper, player_num: int, path: str):
|
||||
super().__init__(tex, player_num, path)
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
super().__init__(tex, index, path)
|
||||
self.screen_change = Animation.create_texture_change(8000, textures=[(0, 2000, 0), (2000, 4000, 1), (4000, 6000, 2), (6000, 8000, 3)])
|
||||
self.screen_change.loop = True
|
||||
self.screen_change.start()
|
||||
|
||||
Reference in New Issue
Block a user