From bb79582238e12d3488070ea6089fc03c1b89a68a Mon Sep 17 00:00:00 2001 From: Anthony Samms Date: Sun, 26 Oct 2025 15:10:11 -0400 Subject: [PATCH] add dan skin --- libs/background.py | 34 ++++++++++++++++++----------- libs/bg_collabs/__init__.py | 1 + libs/bg_collabs/dan.py | 43 +++++++++++++++++++++++++++++++++++++ libs/bg_objects/chibi.py | 2 +- scenes/game.py | 6 +++--- 5 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 libs/bg_collabs/dan.py diff --git a/libs/background.py b/libs/background.py index 2523b71..1c2b12f 100644 --- a/libs/background.py +++ b/libs/background.py @@ -18,7 +18,8 @@ class Background: "ANIMAL": libs.bg_collabs.animal.Background, "BUTTOBURST": libs.bg_collabs.buttoburst.Background, "OSHIRI": libs.bg_collabs.oshiri.Background, - "IMAS": libs.bg_collabs.imas.Background + "IMAS": libs.bg_collabs.imas.Background, + "DAN": libs.bg_collabs.dan.Background } def __init__(self, player_num: int, bpm: float, scene_preset: str = ''): """ @@ -91,13 +92,15 @@ class Background: player_num (int): The player number. bad (bool): Whether the chibi is bad. """ - self.chibi.add_chibi(player_num, bad) + if self.chibi is not None: + self.chibi.add_chibi(player_num, bad) def add_renda(self): """ Add a renda to the background. """ - self.renda.add_renda() + if self.renda is not None: + self.renda.add_renda() def update(self, current_time_ms: float, bpm: float, gauge_1p, gauge_2p = None): """ @@ -135,32 +138,39 @@ class Background: self.fever.update(current_time_ms, bpm) if self.dancer is not None: self.dancer.update(current_time_ms, bpm) - self.renda.update(current_time_ms) - self.chibi.update(current_time_ms, bpm) + if self.renda is not None: + self.renda.update(current_time_ms) + if self.chibi is not None: + self.chibi.update(current_time_ms, bpm) def draw(self): """ Draw the background. """ if self.bg_normal is not None: - if self.is_clear and not self.bg_fever.transitioned: - self.bg_normal.draw(self.tex_wrapper) - self.bg_fever.draw(self.tex_wrapper) - elif self.is_clear: - self.bg_fever.draw(self.tex_wrapper) + if self.bg_fever is not None: + if self.is_clear and not self.bg_fever.transitioned: + self.bg_normal.draw(self.tex_wrapper) + self.bg_fever.draw(self.tex_wrapper) + elif self.is_clear: + self.bg_fever.draw(self.tex_wrapper) + else: + self.bg_normal.draw(self.tex_wrapper) else: self.bg_normal.draw(self.tex_wrapper) self.don_bg.draw(self.tex_wrapper) if self.don_bg_2 is not None: self.don_bg_2.draw(self.tex_wrapper, y=536) - self.renda.draw() + if self.renda is not None: + self.renda.draw() if self.dancer is not None: self.dancer.draw(self.tex_wrapper) if self.footer is not None: self.footer.draw(self.tex_wrapper) if self.is_rainbow and self.fever is not None: self.fever.draw(self.tex_wrapper) - self.chibi.draw() + if self.chibi is not None: + self.chibi.draw() def unload(self): """ diff --git a/libs/bg_collabs/__init__.py b/libs/bg_collabs/__init__.py index e1625ae..4daea71 100644 --- a/libs/bg_collabs/__init__.py +++ b/libs/bg_collabs/__init__.py @@ -3,3 +3,4 @@ from . import animal from . import buttoburst from . import oshiri from . import imas +from . import dan diff --git a/libs/bg_collabs/dan.py b/libs/bg_collabs/dan.py new file mode 100644 index 0000000..dd67b32 --- /dev/null +++ b/libs/bg_collabs/dan.py @@ -0,0 +1,43 @@ +from libs.animation import Animation +from libs.bg_objects.bg_normal import BGNormalBase +from libs.bg_objects.chibi import ChibiController +from libs.bg_objects.don_bg import DonBG6 +from libs.bg_objects.footer import Footer +from libs.texture import TextureWrapper + +class Background: + def __init__(self, tex: TextureWrapper, player_num: int, bpm: float): + self.tex_wrapper = tex + path = 'background/collab/dan' + self.max_dancers = 5 + self.don_bg = DonBG(self.tex_wrapper, 0, 1, path) + self.bg_normal = BGNormalBase(self.tex_wrapper, 0, path) + self.bg_fever = None + self.footer = Footer(self.tex_wrapper, 0, path) + self.fever = None + self.dancer = None + self.renda = None + self.chibi = ChibiController(self.tex_wrapper, 2, bpm, path) + +class DonBG(DonBG6): + def __init__(self, tex: TextureWrapper, player_num: int, bpm: float, path: str): + super().__init__(tex, player_num, bpm, path) + self.overlay_move_2 = Animation.create_move(8000, total_distance=-760) + self.overlay_move_2.loop = True + self.overlay_move_2.start() + + def update(self, current_time_ms: float, is_clear: bool): + super().update(current_time_ms, is_clear) + self.overlay_move_2.update(current_time_ms) + + 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) + 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) diff --git a/libs/bg_objects/chibi.py b/libs/bg_objects/chibi.py index aac41ce..d27a637 100644 --- a/libs/bg_objects/chibi.py +++ b/libs/bg_objects/chibi.py @@ -85,7 +85,7 @@ class Chibi0(BaseChibi): class Chibi2(BaseChibi): def __init__(self, index: int, bpm: float, tex: TextureWrapper, is_2p: bool): super().__init__(index, bpm, tex, is_2p) - self.rotate = Animation.create_move(60000 / self.bpm / 2, total_distance=360, reverse_delay=0) + self.rotate = Animation.create_move(60000 / self.bpm, total_distance=360) self.rotate.start() def update(self, current_time_ms: float): diff --git a/scenes/game.py b/scenes/game.py index 02a6385..6668bb2 100644 --- a/scenes/game.py +++ b/scenes/game.py @@ -1779,9 +1779,9 @@ class GogoTime: """Displays the Gogo Time fire and fireworks""" def __init__(self, is_2p: bool): self.is_2p = is_2p - self.explosion_anim = tex.get_animation(23) - self.fire_resize = tex.get_animation(24) - self.fire_change = tex.get_animation(25) + self.explosion_anim = tex.get_animation(23, is_copy=True) + self.fire_resize = tex.get_animation(24, is_copy=True) + self.fire_change = tex.get_animation(25, is_copy=True) self.explosion_anim.start() self.fire_resize.start()