+ idol animation to results

This commit is contained in:
FajsiEx 2021-07-28 00:02:23 +02:00
parent f2436ba259
commit 73bd0e8a85
1 changed files with 21 additions and 0 deletions

View File

@ -15,7 +15,11 @@ local bottomPanelImage = gfx.CreateSkinImage("result/panels/bottom.png", 0);
local jacketImage = gfx.CreateSkinImage("result/default_jacket.png", 0); local jacketImage = gfx.CreateSkinImage("result/default_jacket.png", 0);
-- ANIMS
local idolAnimation = gfx.LoadSkinAnimation('idol', 1/30, 0, false);
local transitionEnterScale = 0; local transitionEnterScale = 0;
local idolAnimTransitionScale = 0;
local rightPanelX = 0; local rightPanelX = 0;
local rightPanelY = 850; local rightPanelY = 850;
@ -74,6 +78,21 @@ function drawTimingBar(y, value, max, type)
gfx.ClosePath(); gfx.ClosePath();
end end
local drawIdol = function (deltaTime)
local idolAnimTickRes = gfx.TickAnimation(idolAnimation, deltaTime);
if idolAnimTickRes == 1 then
gfx.GlobalAlpha(idolAnimTransitionScale);
idolAnimTransitionScale = idolAnimTransitionScale + 1/60;
if (idolAnimTransitionScale > 1) then
idolAnimTransitionScale = 1;
end
gfx.ImageRect(0, 0, resx, resy, idolAnimation, 1, 0);
gfx.GlobalAlpha(1);
end
end
local drawTopBar = function() local drawTopBar = function()
gfx.BeginPath(); gfx.BeginPath();
local tw, th = gfx.ImageSize(topBarImage); local tw, th = gfx.ImageSize(topBarImage);
@ -240,6 +259,8 @@ render = function(deltaTime, showStats)
gfx.ImageRect(0, 0, desw, desh, backgroundImage, 1, 0); gfx.ImageRect(0, 0, desw, desh, backgroundImage, 1, 0);
drawIdol(deltaTime)
drawTopBar() drawTopBar()
drawBottomPanel() drawBottomPanel()
drawRightPanel() drawRightPanel()