From 21ae411c6716163b460b5c711e5cf7c83f2b27b3 Mon Sep 17 00:00:00 2001 From: Anthony Samms Date: Sun, 26 Oct 2025 19:05:47 -0400 Subject: [PATCH] assets --- libs/bg_collabs/imas_sidem.py | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 libs/bg_collabs/imas_sidem.py diff --git a/libs/bg_collabs/imas_sidem.py b/libs/bg_collabs/imas_sidem.py new file mode 100644 index 0000000..b6b9d4c --- /dev/null +++ b/libs/bg_collabs/imas_sidem.py @@ -0,0 +1,69 @@ +from libs.animation import Animation +from libs.bg_collabs.imas import Fever +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.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, 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) + self.bg_normal = BGNormal(self.tex_wrapper, 0, path) + self.bg_fever = BGFever(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 DonBG(DonBGBase): + def __init__(self, tex: TextureWrapper, index: int, player_num: int, path: str): + super().__init__(tex, index, player_num, path) + self.move = Animation.create_move(3000, total_distance=-304) + 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) + +class BGNormal(BGNormalBase): + def __init__(self, tex: TextureWrapper, player_num: int, path: str): + super().__init__(tex, player_num, 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() + + def update(self, current_time_ms: float): + super().update(current_time_ms) + self.screen_change.update(current_time_ms) + + def draw(self, tex: TextureWrapper): + tex.draw_texture(self.name, 'background') + tex.draw_texture(self.name, 'screen', frame=self.screen_change.attribute) + 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) + 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() + self.transitioned = True + + def update(self, current_time_ms: float): + super().update(current_time_ms) + self.screen_change.update(current_time_ms) + + def draw(self, tex: TextureWrapper): + tex.draw_texture(self.name, 'background') + tex.draw_texture(self.name, 'screen', frame=self.screen_change.attribute) + tex.draw_texture(self.name, 'overlay') + tex.draw_texture(self.name, 'overlay_2')