minor refactor

This commit is contained in:
Hersi 2022-06-22 03:03:48 +02:00
parent 8ed4e141db
commit 2c34f362d4
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ function SplashPage:fadeTransition(deltaTime, fadeDuration, fadeColor)
local halfDuration = fadeDuration / 2
if self.__fadeTimer < halfDuration then
fadeAlpha = Common.lerp(self.__fadeTimer, 0, 0, halfDuration, 255) -- fade out
elseif self.__fadeTimer - fadeDuration < 0 then
elseif self.__fadeTimer < fadeDuration then
fadeAlpha = Common.lerp(self.__fadeTimer, halfDuration, 255, fadeDuration, 0) -- fade in
else
self.__fadeStarted = false -- fade done, reset variable