result: play the cover back for a retry #52

Merged
GanYiZhong merged 1 commits from GanYiZhong/YataiDONNijiiro:fix/result-retry-reverse into main 2026-10-13 15:00:20 +02:00
+10 -2
View File
@@ -22,6 +22,12 @@ function ResultFadeIn.new(player_num)
return self
end
-- retry: the parent plays the same cover back the other way, closing over the screen
function ResultFadeIn:start_reverse()
self.reversed = true
self.fade_in:restart()
end
function ResultFadeIn:update(current_ms)
self.fade_in:update(current_ms)
end
@@ -31,9 +37,11 @@ function ResultFadeIn:is_finished()
end
function ResultFadeIn:draw()
local fade = self.fade_in.attribute
if self.reversed then fade = 1 - fade end
if self.layers then
self.layers:draw(self.fade_in.attribute, __hss_result_bg_clear or 0.0)
self.layers:draw(fade, __hss_result_bg_clear or 0.0)
elseif self.t_bg then
tex.draw_texture(self.t_bg, { fade = self.fade_in.attribute })
tex.draw_texture(self.t_bg, { fade = fade })
end
end