diff --git a/scripts/result.lua b/scripts/result.lua index 3c5201a..0c2532c 100644 --- a/scripts/result.lua +++ b/scripts/result.lua @@ -15,7 +15,11 @@ local bottomPanelImage = gfx.CreateSkinImage("result/panels/bottom.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 idolAnimTransitionScale = 0; local rightPanelX = 0; local rightPanelY = 850; @@ -74,6 +78,21 @@ function drawTimingBar(y, value, max, type) gfx.ClosePath(); 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() gfx.BeginPath(); local tw, th = gfx.ImageSize(topBarImage); @@ -240,6 +259,8 @@ render = function(deltaTime, showStats) gfx.ImageRect(0, 0, desw, desh, backgroundImage, 1, 0); + drawIdol(deltaTime) + drawTopBar() drawBottomPanel() drawRightPanel()