mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
add tamashii fire to gauge
This commit is contained in:
@@ -1948,6 +1948,7 @@ class Gauge:
|
|||||||
self.clear_start = [52, 60, 69, 69]
|
self.clear_start = [52, 60, 69, 69]
|
||||||
self.gauge_max = 87
|
self.gauge_max = 87
|
||||||
self.level = min(10, level)
|
self.level = min(10, level)
|
||||||
|
self.tamashii_fire_change = tex.get_animation(25)
|
||||||
if self.difficulty == 2:
|
if self.difficulty == 2:
|
||||||
self.string_diff = "_hard"
|
self.string_diff = "_hard"
|
||||||
elif self.difficulty == 1:
|
elif self.difficulty == 1:
|
||||||
@@ -2031,6 +2032,7 @@ class Gauge:
|
|||||||
self.rainbow_fade_in = Animation.create_fade(450, initial_opacity=0.0, final_opacity=1.0)
|
self.rainbow_fade_in = Animation.create_fade(450, initial_opacity=0.0, final_opacity=1.0)
|
||||||
self.rainbow_fade_in.start()
|
self.rainbow_fade_in.start()
|
||||||
self.gauge_update_anim.update(current_ms)
|
self.gauge_update_anim.update(current_ms)
|
||||||
|
self.tamashii_fire_change.update(current_ms)
|
||||||
|
|
||||||
if self.rainbow_fade_in is not None:
|
if self.rainbow_fade_in is not None:
|
||||||
self.rainbow_fade_in.update(current_ms)
|
self.rainbow_fade_in.update(current_ms)
|
||||||
@@ -2087,7 +2089,11 @@ class Gauge:
|
|||||||
# Draw clear status indicators
|
# Draw clear status indicators
|
||||||
if gauge_length >= clear_point:
|
if gauge_length >= clear_point:
|
||||||
tex.draw_texture('gauge', 'clear', index=min(2, self.difficulty))
|
tex.draw_texture('gauge', 'clear', index=min(2, self.difficulty))
|
||||||
|
if self.is_rainbow:
|
||||||
|
tex.draw_texture('gauge', 'tamashii_fire', scale=0.75, center=True, frame=self.tamashii_fire_change.attribute)
|
||||||
tex.draw_texture('gauge', 'tamashii')
|
tex.draw_texture('gauge', 'tamashii')
|
||||||
|
if self.is_rainbow and self.tamashii_fire_change.attribute in (0, 1, 4, 5):
|
||||||
|
tex.draw_texture('gauge', 'tamashii_overlay', fade=0.5)
|
||||||
else:
|
else:
|
||||||
tex.draw_texture('gauge', 'clear_dark', index=min(2, self.difficulty))
|
tex.draw_texture('gauge', 'clear_dark', index=min(2, self.difficulty))
|
||||||
tex.draw_texture('gauge', 'tamashii_dark')
|
tex.draw_texture('gauge', 'tamashii_dark')
|
||||||
|
|||||||
@@ -453,6 +453,7 @@ class Gauge:
|
|||||||
self.string_diff = "_easy"
|
self.string_diff = "_easy"
|
||||||
self.rainbow_animation = tex.get_animation(16)
|
self.rainbow_animation = tex.get_animation(16)
|
||||||
self.gauge_fade_in = tex.get_animation(17)
|
self.gauge_fade_in = tex.get_animation(17)
|
||||||
|
self.tamashii_fire_change = tex.get_animation(20)
|
||||||
self.rainbow_animation.start()
|
self.rainbow_animation.start()
|
||||||
self.gauge_fade_in.start()
|
self.gauge_fade_in.start()
|
||||||
self.is_finished = self.gauge_fade_in.is_finished
|
self.is_finished = self.gauge_fade_in.is_finished
|
||||||
@@ -465,6 +466,7 @@ class Gauge:
|
|||||||
|
|
||||||
def update(self, current_ms: float):
|
def update(self, current_ms: float):
|
||||||
self.rainbow_animation.update(current_ms)
|
self.rainbow_animation.update(current_ms)
|
||||||
|
self.tamashii_fire_change.update(current_ms)
|
||||||
if self.rainbow_animation.is_finished:
|
if self.rainbow_animation.is_finished:
|
||||||
self.rainbow_animation.restart()
|
self.rainbow_animation.restart()
|
||||||
self.gauge_fade_in.update(current_ms)
|
self.gauge_fade_in.update(current_ms)
|
||||||
@@ -498,7 +500,11 @@ class Gauge:
|
|||||||
|
|
||||||
if gauge_length >= self.clear_start[self.difficulty]:
|
if gauge_length >= self.clear_start[self.difficulty]:
|
||||||
tex.draw_texture('gauge', 'clear', scale=scale, fade=self.gauge_fade_in.attribute, index=self.difficulty)
|
tex.draw_texture('gauge', 'clear', scale=scale, fade=self.gauge_fade_in.attribute, index=self.difficulty)
|
||||||
tex.draw_texture('gauge', 'tamashii', scale=scale, fade=self.gauge_fade_in.attribute)
|
if self.state == State.RAINBOW:
|
||||||
|
tex.draw_texture('gauge', 'tamashii_fire', scale=0.75 * scale, center=True, frame=self.tamashii_fire_change.attribute, fade=self.gauge_fade_in.attribute)
|
||||||
|
tex.draw_texture('gauge', 'tamashii', scale=scale, fade=self.gauge_fade_in.attribute)
|
||||||
|
if self.state == State.RAINBOW and self.tamashii_fire_change.attribute in (0, 1, 4, 5):
|
||||||
|
tex.draw_texture('gauge', 'tamashii_overlay', scale=scale, fade=min(0.5, self.gauge_fade_in.attribute))
|
||||||
else:
|
else:
|
||||||
tex.draw_texture('gauge', 'clear_dark', scale=scale, fade=self.gauge_fade_in.attribute, index=self.difficulty)
|
tex.draw_texture('gauge', 'clear_dark', scale=scale, fade=self.gauge_fade_in.attribute, index=self.difficulty)
|
||||||
tex.draw_texture('gauge', 'tamashii_dark', scale=scale, fade=self.gauge_fade_in.attribute)
|
tex.draw_texture('gauge', 'tamashii_dark', scale=scale, fade=self.gauge_fade_in.attribute)
|
||||||
|
|||||||
Reference in New Issue
Block a user