2021-08-31 18:24:48 +02:00
|
|
|
|
|
|
|
local consoleBaseImage = gfx.CreateSkinImage("gameplay/console/base.png", 0)
|
|
|
|
|
|
|
|
local CONSOLE_W = 1352;
|
|
|
|
local CONSOLE_H = 712;
|
|
|
|
|
|
|
|
-- Similar to crit line transforms, since the console needs to follow the lane rotation
|
|
|
|
local setUpTransforms = function (x,y,rotation)
|
2021-10-28 17:27:26 +02:00
|
|
|
local resx, resy = game.GetResolution()
|
|
|
|
local desw = 1080
|
|
|
|
local desh = 1920
|
|
|
|
local scale = resx / desw
|
|
|
|
|
|
|
|
|
2021-08-31 18:24:48 +02:00
|
|
|
gfx.Translate(x, y)
|
|
|
|
gfx.Rotate(rotation)
|
2021-10-28 17:27:26 +02:00
|
|
|
gfx.Scale(scale,scale)
|
2021-08-31 18:24:48 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local render = function (deltaTime, critLineCenterX, critLineCenterY, critLineRotation)
|
|
|
|
setUpTransforms(
|
|
|
|
critLineCenterX,
|
2021-10-28 17:27:26 +02:00
|
|
|
critLineCenterY,
|
2021-08-31 18:24:48 +02:00
|
|
|
critLineRotation
|
|
|
|
)
|
|
|
|
|
|
|
|
gfx.BeginPath();
|
|
|
|
gfx.ImageRect(
|
|
|
|
-CONSOLE_W/2,
|
2021-10-28 17:27:26 +02:00
|
|
|
-CONSOLE_H/2+350,
|
2021-08-31 18:24:48 +02:00
|
|
|
CONSOLE_W,
|
|
|
|
CONSOLE_H,
|
|
|
|
consoleBaseImage,
|
|
|
|
1,
|
|
|
|
0
|
|
|
|
);
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
render=render
|
|
|
|
}
|