mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
fix backgrounds
This commit is contained in:
@@ -30,7 +30,7 @@ class BGFeverBase:
|
||||
class BGFever1(BGFeverBase):
|
||||
class Tile:
|
||||
def __init__(self, tex):
|
||||
self.expansion = Animation.create_move(166, total_distance=tex.screen_height//2)
|
||||
self.expansion = Animation.create_move(166 * tex.screen_scale, total_distance=tex.screen_height//2)
|
||||
self.expansion.start()
|
||||
def update(self, current_time_ms):
|
||||
self.expansion.update(current_time_ms)
|
||||
@@ -60,9 +60,9 @@ class BGFever1(BGFeverBase):
|
||||
self.wave_spin = tex.get_animation(28)
|
||||
self.wave_origin = ray.Vector2(tex.textures[self.name]['wave'].width/2,tex.textures[self.name]['wave'].height/2)
|
||||
self.circle = {
|
||||
"center_x": 100,
|
||||
"center_y": 130,
|
||||
"radius": 200,
|
||||
"center_x": 100 * tex.screen_scale,
|
||||
"center_y": 130 * tex.screen_scale,
|
||||
"radius": 200 * tex.screen_scale,
|
||||
}
|
||||
self.lookup_table_size = 360 # One entry per degree
|
||||
self._precomputed_positions: list[tuple[float, float]] = []
|
||||
@@ -112,7 +112,7 @@ class BGFever1(BGFeverBase):
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
for i, tile in enumerate(self.bg_tiles):
|
||||
tile.draw(tex, self.name, (i*128)-self.bg_move.attribute, i % 10)
|
||||
tile.draw(tex, self.name, (i*tex.textures[self.name]['background'].width)-self.bg_move.attribute, i % 10)
|
||||
tex.draw_texture(self.name, 'mountain', y=-self.mountain_move_up.attribute+self.mountain_move_down.attribute)
|
||||
wave_x, wave_y = self._get_wave_position()
|
||||
tex.draw_texture(self.name, 'wave', x=wave_x, y=wave_y, origin=self.wave_origin)
|
||||
@@ -165,9 +165,9 @@ class BGFever3(BGFeverBase):
|
||||
self.fish_spin = tex.get_animation(28)
|
||||
|
||||
self.circle = {
|
||||
"center_x": 500,
|
||||
"center_y": 300,
|
||||
"radius": 300,
|
||||
"center_x": 500 * tex.screen_scale,
|
||||
"center_y": 300 * tex.screen_scale,
|
||||
"radius": 300 * tex.screen_scale,
|
||||
}
|
||||
self.num_fish = 8
|
||||
self.fish_spacing = (2 * math.pi) / self.num_fish # 45 degrees in radians
|
||||
@@ -248,7 +248,7 @@ class BGFever3(BGFeverBase):
|
||||
footer_wave_x, footer_wave_y = self._get_small_circle_position(self.fish_spin.attribute, 3.0)
|
||||
for i in range(3):
|
||||
tex.draw_texture(self.name, 'footer_2',
|
||||
x=footer_wave_x + (i*600), y=footer_wave_y,
|
||||
x=footer_wave_x + (i*600 * tex.screen_scale), y=footer_wave_y,
|
||||
fade=self.fadein.attribute, origin=self.wave_origin)
|
||||
|
||||
for i in range(3):
|
||||
@@ -283,8 +283,8 @@ class BGFever4(BGFeverBase):
|
||||
self.horizontal_move.update(current_time_ms)
|
||||
def draw(self, tex: TextureWrapper):
|
||||
y = self.bg_texture_move_down.attribute - self.bg_texture_move_up.attribute
|
||||
for i in range(0, 1384, 104):
|
||||
for i in range(0, tex.textures[self.name]['background'].width*13, tex.textures[self.name]['background'].width):
|
||||
tex.draw_texture(self.name, 'background', x=i, y=y)
|
||||
tex.draw_texture(self.name, 'overlay_1', y=-self.vertical_move.attribute - y)
|
||||
tex.draw_texture(self.name, 'overlay_2', x=-self.horizontal_move.attribute, y=y)
|
||||
tex.draw_texture(self.name, 'overlay_2', x=1256 - self.horizontal_move.attribute, y=y)
|
||||
tex.draw_texture(self.name, 'overlay_2', x=tex.textures[self.name]['overlay_2'].width - self.horizontal_move.attribute, y=y)
|
||||
|
||||
@@ -73,7 +73,7 @@ class BGNormal4(BGNormalBase):
|
||||
def __init__(self, tex: TextureWrapper):
|
||||
self.spawn_point = self.random_excluding_range(tex.screen_width)
|
||||
duration = random.randint(1400, 2000)
|
||||
self.move_x = Animation.create_move(duration, total_distance=random.randint(-300, 300))
|
||||
self.move_x = Animation.create_move(duration, total_distance=random.randint(int(-300 * tex.screen_scale), int(300 * tex.screen_scale)))
|
||||
self.move_y = Animation.create_move(duration, total_distance=tex.screen_height//2)
|
||||
self.move_x.start()
|
||||
self.move_y.start()
|
||||
|
||||
@@ -54,7 +54,7 @@ class BaseChibi:
|
||||
self.vert_move.start()
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
class ChibiBad(BaseChibi):
|
||||
def __init__(self, index: int, bpm: float, tex: TextureWrapper, is_2p: bool):
|
||||
@@ -63,9 +63,9 @@ class ChibiBad(BaseChibi):
|
||||
self.index = random.randint(0, 2)
|
||||
self.keyframes = [3, 4]
|
||||
duration = (60000 / self.bpm) / 2
|
||||
self.hori_move = Animation.create_move(duration * 10, total_distance=1280 * self.tex.screen_width)
|
||||
self.hori_move = Animation.create_move(duration * 10, total_distance=tex.screen_width)
|
||||
self.hori_move.start()
|
||||
self.vert_move = Animation.create_move(duration, total_distance=50 * self.tex.screen_scale, reverse_delay=0)
|
||||
self.vert_move = Animation.create_move(duration, total_distance=50 * tex.screen_scale, reverse_delay=0)
|
||||
self.vert_move.start()
|
||||
self.fade_in = Animation.create_fade(duration, initial_opacity=0.0, final_opacity=1.0)
|
||||
self.fade_in.start()
|
||||
@@ -85,13 +85,13 @@ class ChibiBad(BaseChibi):
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
if not self.s_texture_change.is_finished:
|
||||
tex.draw_texture('chibi_bad', '0', frame=self.s_texture_change.attribute, x=self.hori_move.attribute, y=self.vert_move.attribute+(self.is_2p*535), fade=self.fade_in.attribute)
|
||||
tex.draw_texture('chibi_bad', '0', frame=self.s_texture_change.attribute, x=self.hori_move.attribute, y=self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y), fade=self.fade_in.attribute)
|
||||
else:
|
||||
tex.draw_texture('chibi_bad', '0', frame=self.texture_change.attribute, x=self.hori_move.attribute, y=self.vert_move.attribute+(self.is_2p*535))
|
||||
tex.draw_texture('chibi_bad', '0', frame=self.texture_change.attribute, x=self.hori_move.attribute, y=self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
class Chibi0(BaseChibi):
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=self.vert_move.attribute+(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
class Chibi2(BaseChibi):
|
||||
def __init__(self, index: int, bpm: float, tex: TextureWrapper, is_2p: bool):
|
||||
@@ -107,19 +107,19 @@ class Chibi2(BaseChibi):
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
origin = ray.Vector2(64, 64)
|
||||
tex.draw_texture(self.name, str(self.index), x=self.hori_move.attribute+origin.x, y=origin.y+(self.is_2p*535), origin=origin, rotation=self.rotate.attribute)
|
||||
tex.draw_texture(self.name, str(self.index), x=self.hori_move.attribute+origin.x, y=origin.y+(self.is_2p*tex.skin_config["game_2p_offset"].y), origin=origin, rotation=self.rotate.attribute)
|
||||
|
||||
class Chibi4(BaseChibi):
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
class Chibi5(BaseChibi):
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
class Chibi8(BaseChibi):
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.texture_change.attribute, x=self.hori_move.attribute, y=(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
class Chibi13(BaseChibi):
|
||||
def __init__(self, index: int, bpm: float, tex: TextureWrapper, is_2p: bool):
|
||||
@@ -140,11 +140,11 @@ class Chibi13(BaseChibi):
|
||||
self.frame = 0
|
||||
|
||||
def draw(self, tex: TextureWrapper):
|
||||
tex.draw_texture(self.name, 'tail', frame=self.frame, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*535))
|
||||
tex.draw_texture(self.name, 'tail', frame=self.frame, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
if self.scale.attribute == 0.75:
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.frame, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), frame=self.frame, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
else:
|
||||
tex.draw_texture(self.name, str(self.index), scale=self.scale.attribute, center=True, frame=self.frame, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*535))
|
||||
tex.draw_texture(self.name, str(self.index), scale=self.scale.attribute, center=True, frame=self.frame, x=self.hori_move.attribute, y=-self.vert_move.attribute+(self.is_2p*tex.skin_config["game_2p_offset"].y))
|
||||
|
||||
|
||||
class ChibiController:
|
||||
|
||||
@@ -19,6 +19,7 @@ class BaseDancer:
|
||||
self.name = name
|
||||
self.index = index
|
||||
self.bpm = bpm
|
||||
self.tex = tex
|
||||
tex_list = tex.textures[self.name][str(self.index) + '_loop'].texture
|
||||
keyframe_len = tex_list if isinstance(tex_list, list) else [0]
|
||||
self.keyframes = [i for i in range(len(keyframe_len))]
|
||||
@@ -36,8 +37,8 @@ class BaseDancer:
|
||||
self.is_started = True
|
||||
|
||||
duration = (60000 / self.bpm)
|
||||
self.s_bounce_up = Animation.create_move(duration/2, start_position=-200, total_distance=350, ease_out='quadratic', delay=500)
|
||||
self.s_bounce_down = Animation.create_move(duration/2, total_distance=140, ease_in='quadratic', delay=self.s_bounce_up.duration + 500)
|
||||
self.s_bounce_up = Animation.create_move(duration/2, start_position=-200 * self.tex.screen_scale, total_distance=350 * self.tex.screen_scale, ease_out='quadratic', delay=500)
|
||||
self.s_bounce_down = Animation.create_move(duration/2, total_distance=140 * self.tex.screen_scale, ease_in='quadratic', delay=self.s_bounce_up.duration + 500)
|
||||
self.start_textures = [((duration / len(self.start_keyframes))*i, (duration / len(self.start_keyframes))*(i+1), index) for i, index in enumerate(self.start_keyframes)]
|
||||
self.s_texture_change = Animation.create_texture_change(duration, textures=self.start_textures, delay=500)
|
||||
self.s_texture_change.start()
|
||||
@@ -89,7 +90,7 @@ class Dancer0_4(BaseDancer):
|
||||
if not self.is_started:
|
||||
return
|
||||
if not self.s_texture_change.is_finished:
|
||||
tex.draw_texture(self.name, '4_start', frame=7, x=x, y=-50-self.s_bounce_up.attribute + self.s_bounce_down.attribute)
|
||||
tex.draw_texture(self.name, '4_start', frame=7, x=x, y=(-50 * self.tex.screen_scale)-self.s_bounce_up.attribute + self.s_bounce_down.attribute)
|
||||
tex.draw_texture(self.name, '4_start', frame=self.s_texture_change.attribute, x=x, y=-self.s_bounce_up.attribute + self.s_bounce_down.attribute)
|
||||
else:
|
||||
if 0 <= self.texture_change.attribute <= 3:
|
||||
|
||||
@@ -25,7 +25,7 @@ class DonBGBase:
|
||||
|
||||
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*328)+self.move.attribute, y=y)
|
||||
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)
|
||||
|
||||
def update(self, current_time_ms: float, is_clear: bool):
|
||||
if not self.is_clear and is_clear:
|
||||
@@ -42,12 +42,12 @@ class DonBG1(DonBGBase):
|
||||
super().update(current_time_ms, is_clear)
|
||||
self.overlay_move.update(current_time_ms)
|
||||
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*328)+self.move.attribute, y=y)
|
||||
for i in range(6):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*347)+self.move.attribute*(347/328), y=self.overlay_move.attribute+y)
|
||||
for i in range(30):
|
||||
tex.draw_texture(self.name, 'footer', frame=self.is_clear, fade=fade, x=(i*56)+self.move.attribute*((56/328)*3), y=self.overlay_move.attribute+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)
|
||||
for i in range(int(6 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay'].width)+self.move.attribute*(tex.textures[self.name]['overlay'].width/tex.textures[self.name]['background'].width), y=self.overlay_move.attribute+y)
|
||||
for i in range(int(30 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'footer', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['footer'].width)+self.move.attribute*((tex.textures[self.name]['footer'].width/tex.textures[self.name]['background'].width)*3), y=self.overlay_move.attribute+y)
|
||||
|
||||
class DonBG2(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
@@ -57,9 +57,9 @@ class DonBG2(DonBGBase):
|
||||
super().update(current_time_ms, is_clear)
|
||||
self.overlay_move.update(current_time_ms)
|
||||
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*328)+self.move.attribute, y=y)
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, 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, 'background', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['background'].width)+self.move.attribute, y=y)
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay'].width)+self.move.attribute, y=self.overlay_move.attribute+y)
|
||||
|
||||
class DonBG3(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
@@ -82,11 +82,11 @@ class DonBG3(DonBGBase):
|
||||
self.overlay_move_2.update(current_time_ms)
|
||||
|
||||
def _draw_textures(self, tex: TextureWrapper, fade: float, y: float):
|
||||
for i in range(10):
|
||||
tex.draw_texture(self.name, 'background', frame=self.is_clear, fade=fade, x=(i*164)+self.move.attribute, y=y)
|
||||
for i in range(int(10 * 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)
|
||||
y_pos = self.bounce_up.attribute - self.bounce_down.attribute + self.overlay_move.attribute + self.overlay_move_2.attribute
|
||||
for i in range(6):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*328)+(self.move.attribute*2), y=y_pos+y)
|
||||
for i in range(int(6 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay'].width)+(self.move.attribute*2), y=y_pos+y)
|
||||
|
||||
class DonBG4(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
@@ -97,9 +97,9 @@ class DonBG4(DonBGBase):
|
||||
self.overlay_move.update(current_time_ms)
|
||||
|
||||
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*328)+self.move.attribute, y=y)
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, 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, 'background', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['background'].width)+self.move.attribute, y=y)
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay'].width)+self.move.attribute, y=self.overlay_move.attribute+y)
|
||||
|
||||
class DonBG5(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
@@ -120,10 +120,10 @@ class DonBG5(DonBGBase):
|
||||
self.adjust.update(current_time_ms)
|
||||
|
||||
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*328)+self.move.attribute, y=y)
|
||||
for i in range(6):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*368)+(self.move.attribute * ((184/328)*2)), y=self.bounce_up.attribute - self.bounce_down.attribute - self.adjust.attribute + 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)
|
||||
for i in range(int(6 * tex.screen_scale)):
|
||||
tex.draw_texture(self.name, 'overlay', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay'].width)+self.move.attribute, y=self.bounce_up.attribute - self.bounce_down.attribute - self.adjust.attribute + y)
|
||||
|
||||
class DonBG6(DonBGBase):
|
||||
def __init__(self, tex: TextureWrapper, index: int, player_num: PlayerNum, path: str):
|
||||
@@ -134,9 +134,9 @@ class DonBG6(DonBGBase):
|
||||
self.overlay_move.update(current_time_ms)
|
||||
|
||||
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*328)+self.move.attribute, y=y)
|
||||
for i in range(0, 6, 2):
|
||||
tex.draw_texture(self.name, 'overlay_1', frame=self.is_clear, fade=fade, x=(i*264) + self.move.attribute*3, y=-self.move.attribute*0.85+y)
|
||||
for i in range(5):
|
||||
tex.draw_texture(self.name, 'overlay_2', frame=self.is_clear, fade=fade, x=(i*328)+self.move.attribute, y=self.overlay_move.attribute+y)
|
||||
for i in range(int(tex.screen_scale * 5)):
|
||||
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 i in range(0, int(6 * tex.screen_scale), 2):
|
||||
tex.draw_texture(self.name, 'overlay_1', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay_1'].width) + self.move.attribute*3, y=-self.move.attribute*0.85+y)
|
||||
for i in range(int(tex.screen_scale * 5)):
|
||||
tex.draw_texture(self.name, 'overlay_2', frame=self.is_clear, fade=fade, x=(i*tex.textures[self.name]['overlay_2'].width)+self.move.attribute, y=self.overlay_move.attribute+y)
|
||||
|
||||
@@ -15,7 +15,7 @@ class Renda:
|
||||
class BaseRenda:
|
||||
def __init__(self, tex: TextureWrapper, index: int):
|
||||
self.name = 'renda_' + str(index)
|
||||
self.hori_move = Animation.create_move(1500, total_distance=tex.screen_width)
|
||||
self.hori_move = Animation.create_move(1500 * tex.screen_scale, total_distance=tex.screen_width)
|
||||
self.hori_move.start()
|
||||
|
||||
def update(self, current_time_ms: float):
|
||||
@@ -24,7 +24,7 @@ class BaseRenda:
|
||||
class Renda0(BaseRenda):
|
||||
def __init__(self, tex: TextureWrapper, index: int):
|
||||
super().__init__(tex, index)
|
||||
self.vert_move = Animation.create_move(1500, total_distance=tex.screen_height + (80 * tex.screen_scale))
|
||||
self.vert_move = Animation.create_move(1500 * tex.screen_scale, total_distance=tex.screen_height + (80 * tex.screen_scale))
|
||||
self.vert_move.start()
|
||||
tex_list = tex.textures['renda'][self.name].texture
|
||||
num_of_rendas = len(tex_list) if isinstance(tex_list, list) else 0
|
||||
@@ -44,7 +44,7 @@ class Renda1(BaseRenda):
|
||||
super().__init__(tex, index)
|
||||
self.frame = random.randint(0, 5)
|
||||
self.y = random.randint(0, int(200 * tex.screen_scale))
|
||||
self.rotate = Animation.create_move(800, total_distance=tex.screen_height//2)
|
||||
self.rotate = Animation.create_move(800 * tex.screen_scale, total_distance=tex.screen_height//2)
|
||||
self.rotate.start()
|
||||
self.origin = ray.Vector2(64, 64)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user