+ landscape support to chain numbers
This commit is contained in:
parent
8283ccfb1f
commit
d2c6a48465
|
@ -4,6 +4,8 @@ local chainLabel = gfx.CreateSkinImage("gameplay/chain/label.png", 0)
|
|||
local desw = 1080;
|
||||
local desh = 1920;
|
||||
|
||||
local isLandscape = false;
|
||||
|
||||
local transitionShakeScale = 0;
|
||||
local transitionShakePosOffset = 0;
|
||||
local shakeTimer = 0;
|
||||
|
@ -63,6 +65,19 @@ local onNewCombo = function ()
|
|||
end
|
||||
|
||||
local render = function (deltaTime, comboState, combo, critLineCenterX, critLineCenterY)
|
||||
gfx.Save();
|
||||
|
||||
local resx, resy = game.GetResolution();
|
||||
isLandscape = resx > resy;
|
||||
|
||||
if (isLandscape) then
|
||||
desw = 1920;
|
||||
desh = 1080;
|
||||
else
|
||||
desw = 1080;
|
||||
desh = 1920;
|
||||
end
|
||||
|
||||
tickTransitions(deltaTime)
|
||||
|
||||
if shakeTimer > 0 then
|
||||
|
@ -73,8 +88,13 @@ local render = function (deltaTime, comboState, combo, critLineCenterX, critLine
|
|||
|
||||
if combo == 0 then return end
|
||||
|
||||
local bottomOffsetMultiplier = 0.333;
|
||||
if (isLandscape) then
|
||||
bottomOffsetMultiplier = 0.25
|
||||
end
|
||||
|
||||
local posx = desw / 2 + transitionShakePosOffset;
|
||||
local posy = desh - 640 + transitionShakePosOffset;
|
||||
local posy = desh - (desh*bottomOffsetMultiplier) + transitionShakePosOffset;
|
||||
|
||||
local chainNumbers = chainNumbersReg --regular
|
||||
if comboState == 2 then
|
||||
|
|
Loading…
Reference in New Issue