mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
halfway through imas collab
This commit is contained in:
@@ -2,3 +2,4 @@ from . import a3
|
||||
from . import animal
|
||||
from . import buttoburst
|
||||
from . import oshiri
|
||||
from . import imas
|
||||
|
||||
@@ -16,7 +16,7 @@ class Background:
|
||||
path = 'background/collab/animal'
|
||||
self.max_dancers = 5
|
||||
self.don_bg = DonBG4(self.tex_wrapper, 4, player_num, 'background')
|
||||
self.bg_normal = BGNormal(self.tex_wrapper, 0, path)
|
||||
self.bg_normal = BGNormalBase(self.tex_wrapper, 0, path)
|
||||
self.bg_fever = BGFever(self.tex_wrapper, 0, path)
|
||||
self.footer = Footer(self.tex_wrapper, 0, path)
|
||||
self.fever = Fever3(self.tex_wrapper, 0, bpm, path)
|
||||
@@ -35,13 +35,6 @@ class DancerGroup(BaseDancerGroup):
|
||||
random.shuffle(self.dancers)
|
||||
self.add_dancer()
|
||||
|
||||
class BGNormal(BGNormalBase):
|
||||
def update(self, current_time_ms: float):
|
||||
pass
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, 'background')
|
||||
|
||||
class BGFever(BGFeverBase):
|
||||
def start(self):
|
||||
self.transitioned = True
|
||||
|
||||
@@ -15,7 +15,7 @@ class Background:
|
||||
path = 'background/collab/buttoburst'
|
||||
self.max_dancers = 4
|
||||
self.don_bg = DonBG4(self.tex_wrapper, 4, player_num, 'background')
|
||||
self.bg_normal = BGNormal(self.tex_wrapper, 0, path)
|
||||
self.bg_normal = BGNormalBase(self.tex_wrapper, 0, path)
|
||||
self.bg_fever = BGFever(self.tex_wrapper, 0, path)
|
||||
self.footer = None
|
||||
self.fever = Fever3(self.tex_wrapper, 0, bpm, path)
|
||||
@@ -34,13 +34,6 @@ class DancerGroup(BaseDancerGroup):
|
||||
random.shuffle(self.dancers)
|
||||
self.add_dancer()
|
||||
|
||||
class BGNormal(BGNormalBase):
|
||||
def update(self, current_time_ms: float):
|
||||
pass
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, 'background')
|
||||
|
||||
class BGFever(BGFeverBase):
|
||||
def start(self):
|
||||
self.transitioned = True
|
||||
|
||||
49
libs/bg_collabs/imas.py
Normal file
49
libs/bg_collabs/imas.py
Normal file
@@ -0,0 +1,49 @@
|
||||
from libs.animation import Animation
|
||||
from libs.bg_objects.bg_fever import BGFeverBase
|
||||
from libs.bg_objects.bg_normal import BGNormalBase
|
||||
from libs.bg_objects.chibi import ChibiController
|
||||
from libs.bg_objects.dancer import BaseDancerGroup
|
||||
from libs.bg_objects.fever import BaseFever
|
||||
from libs.bg_objects.footer import Footer
|
||||
from libs.bg_objects.renda import RendaController
|
||||
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):
|
||||
self.tex_wrapper = tex
|
||||
path = 'background/collab/imas'
|
||||
self.max_dancers = 5
|
||||
self.don_bg = DonBGBase(self.tex_wrapper, 0, player_num, path)
|
||||
self.bg_normal = BGNormalBase(self.tex_wrapper, 0, path)
|
||||
self.bg_fever = BGFeverBase(self.tex_wrapper, 0, path)
|
||||
self.footer = Footer(self.tex_wrapper, 0, path)
|
||||
self.fever = Fever(self.tex_wrapper, 0, bpm, path)
|
||||
self.dancer = BaseDancerGroup(self.tex_wrapper, 0, bpm, self.max_dancers, path)
|
||||
self.renda = RendaController(self.tex_wrapper, 0, path)
|
||||
self.chibi = ChibiController(self.tex_wrapper, 0, bpm, path)
|
||||
|
||||
class Fever(BaseFever):
|
||||
def __init__(self, tex: TextureWrapper, player_num: int, bpm: float, path: str):
|
||||
super().__init__(tex, player_num, bpm, path)
|
||||
self.texture_change = Animation.create_texture_change(120000 / bpm, textures=[(0, (120000 / bpm) / 2, 0), ((120000 / bpm) / 2, 120000 / bpm, 1)])
|
||||
self.texture_change.loop = True
|
||||
self.texture_change.start()
|
||||
|
||||
def update(self, current_time_ms: float, bpm: float):
|
||||
super().update(current_time_ms, bpm)
|
||||
self.texture_change.update(current_time_ms)
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, 'overlay', y=self.bounce_down.attribute-self.bounce_up.attribute, frame=self.texture_change.attribute)
|
||||
|
||||
class BGNormal(BGNormalBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
super().__init__(tex, index, path)
|
||||
|
||||
def update(self, current_time_ms: float, bpm: float):
|
||||
super().update(current_time_ms, bpm)
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
pass
|
||||
@@ -15,7 +15,7 @@ class Background:
|
||||
path = 'background/collab/oshiri'
|
||||
self.max_dancers = 5
|
||||
self.don_bg = DonBG(self.tex_wrapper, 0, 1, path)
|
||||
self.bg_normal = BGNormal(self.tex_wrapper, 0, path)
|
||||
self.bg_normal = BGNormalBase(self.tex_wrapper, 0, path)
|
||||
self.bg_fever = BGFever(self.tex_wrapper, 0, path)
|
||||
self.footer = Footer(self.tex_wrapper, 0, path)
|
||||
self.fever = Fever3(self.tex_wrapper, 0, bpm, path)
|
||||
@@ -49,13 +49,6 @@ class DonBG(DonBGBase):
|
||||
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))
|
||||
|
||||
class BGNormal(BGNormalBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
super().__init__(tex, index, path)
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, 'background')
|
||||
|
||||
class BGFever(BGFeverBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, path: str):
|
||||
super().__init__(tex, index, path)
|
||||
|
||||
Reference in New Issue
Block a user