100 lines
2.1 KiB
Lua
100 lines
2.1 KiB
Lua
|
|
local leftAlertBaseImage = gfx.CreateSkinImage("gameplay/laser_alert/left/base.png", 0)
|
|
local leftAlertTopImage = gfx.CreateSkinImage("gameplay/laser_alert/left/top.png", 0)
|
|
local leftAlertTextImage = gfx.CreateSkinImage("gameplay/laser_alert/left/text.png", 0)
|
|
|
|
local rightAlertBaseImage = gfx.CreateSkinImage("gameplay/laser_alert/right/base.png", 0)
|
|
local rightAlertTopImage = gfx.CreateSkinImage("gameplay/laser_alert/right/top.png", 0)
|
|
local rightAlertTextImage = gfx.CreateSkinImage("gameplay/laser_alert/right/text.png", 0)
|
|
|
|
local LEFT_ALERT_X_POS = 0
|
|
local RIGHT_ALERT_X_POS = 1080 - 450*0.5
|
|
|
|
local ALERT_Y_POS = 1115
|
|
|
|
local test = -2*3.14;
|
|
|
|
local renderLeftAlert = function ()
|
|
-- gfx.Translate(LEFT_ALERT_X_POS, ALERT_Y_POS);
|
|
-- -- gfx.SkewX(-1*3.14)
|
|
-- gfx.Scale(test, 1)
|
|
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
LEFT_ALERT_X_POS+450*0.5,
|
|
ALERT_Y_POS+450*0.5,
|
|
450*0.5,
|
|
450*0.5,
|
|
leftAlertBaseImage,
|
|
1,
|
|
-3.14
|
|
);
|
|
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
LEFT_ALERT_X_POS+450*0.5,
|
|
ALERT_Y_POS+450*0.5,
|
|
450*0.5,
|
|
450*0.5,
|
|
leftAlertTopImage,
|
|
1,
|
|
-3.14
|
|
);
|
|
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
LEFT_ALERT_X_POS,
|
|
ALERT_Y_POS,
|
|
450*0.5,
|
|
450*0.5,
|
|
leftAlertTextImage,
|
|
1,
|
|
0
|
|
);
|
|
|
|
-- gfx.ResetTransform();
|
|
end
|
|
local renderRightAlert = function ()
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
RIGHT_ALERT_X_POS,
|
|
ALERT_Y_POS,
|
|
450*0.5,
|
|
450*0.5,
|
|
rightAlertBaseImage,
|
|
1,
|
|
0
|
|
);
|
|
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
RIGHT_ALERT_X_POS,
|
|
ALERT_Y_POS,
|
|
450*0.5,
|
|
450*0.5,
|
|
rightAlertTopImage,
|
|
1,
|
|
0
|
|
);
|
|
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
RIGHT_ALERT_X_POS,
|
|
ALERT_Y_POS,
|
|
450*0.5,
|
|
450*0.5,
|
|
rightAlertTextImage,
|
|
1,
|
|
0
|
|
);
|
|
end
|
|
|
|
local render = function (deltaTime)
|
|
renderLeftAlert();
|
|
renderRightAlert();
|
|
test = test + deltaTime;
|
|
end
|
|
|
|
return {
|
|
render=render
|
|
} |