+ chain label to chain numbers & + variants of chain numbers depending on comboState
This commit is contained in:
parent
97de42f51c
commit
ef61a29703
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
local chainLabel = gfx.CreateSkinImage("gameplay/chain/label.png", 0)
|
||||||
|
|
||||||
local desw = 1080;
|
local desw = 1080;
|
||||||
local desh = 1920;
|
local desh = 1920;
|
||||||
|
@ -14,7 +15,9 @@ function load_number_image(path)
|
||||||
return images
|
return images
|
||||||
end
|
end
|
||||||
|
|
||||||
local chainNumbers = load_number_image('gameplay/chain/reg')
|
local chainNumbersReg = load_number_image('gameplay/chain/reg')
|
||||||
|
local chainNumbersUC = load_number_image('gameplay/chain/uc')
|
||||||
|
local chainNumbersPUC = load_number_image('gameplay/chain/puc')
|
||||||
|
|
||||||
function draw_number(x, y, alpha, num, digits, images, is_dim, scale, kern)
|
function draw_number(x, y, alpha, num, digits, images, is_dim, scale, kern)
|
||||||
scale = scale or 1;
|
scale = scale or 1;
|
||||||
|
@ -54,35 +57,26 @@ local tickTransitions = function (deltaTime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local render = function (deltaTime, combo, critLineCenterX, critLineCenterY)
|
local render = function (deltaTime, comboState, combo, critLineCenterX, critLineCenterY)
|
||||||
tickTransitions(deltaTime)
|
tickTransitions(deltaTime)
|
||||||
|
|
||||||
if combo == 0 then return end
|
if combo == 0 then return end
|
||||||
|
|
||||||
-- comboTimer = comboTimer + deltaTime
|
|
||||||
|
|
||||||
local posx = desw / 2 + transitionShakePosOffset;
|
local posx = desw / 2 + transitionShakePosOffset;
|
||||||
local posy = desh - 650 + transitionShakePosOffset;
|
local posy = desh - 640 + transitionShakePosOffset;
|
||||||
|
|
||||||
-- if portrait then posy = desh * critLinePos[2] - 150 end
|
local chainNumbers = chainNumbersReg --regular
|
||||||
|
if comboState == 2 then
|
||||||
-- if gameplay.comboState == 2 then
|
chainNumbers = chainNumbersPUC --puc
|
||||||
-- comboCurrent = comboPUC --puc
|
elseif comboState == 1 then
|
||||||
-- elseif gameplay.comboState == 1 then
|
chainNumbers = chainNumbersUC --uc
|
||||||
-- comboCurrent = comboUC --uc
|
end
|
||||||
-- else
|
|
||||||
-- comboCurrent = comboREG --regular
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- local alpha = math.floor(comboTimer * 20) % 2
|
|
||||||
-- alpha = (alpha * 100 + 155) / 255
|
|
||||||
local alpha = 1
|
|
||||||
|
|
||||||
-- \_ chain _/
|
-- \_ chain _/
|
||||||
local tw, th
|
local tw, th
|
||||||
-- tw, th = gfx.ImageSize(comboBottom)
|
tw, th = gfx.ImageSize(chainLabel)
|
||||||
-- gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
-- gfx.ImageRect(posx - tw / 2 + 10, posy - th / 4 - 210, tw * 0.85, th * 0.85, comboBottom, alpha, 0)
|
gfx.ImageRect(posx - tw * 0.85 / 2, posy - 220, tw * 0.85, th * 0.85, chainLabel, 1, 0)
|
||||||
|
|
||||||
tw, th = gfx.ImageSize(chainNumbers[1])
|
tw, th = gfx.ImageSize(chainNumbers[1])
|
||||||
posy = posy - th + 32
|
posy = posy - th + 32
|
||||||
|
|
Loading…
Reference in New Issue