+ laser alert component

This commit is contained in:
FajsiEx 2021-10-01 21:32:20 +02:00
parent 8db97378dc
commit 7ca8ffd561
8 changed files with 103 additions and 0 deletions

View File

@ -6,6 +6,7 @@ local CritLine = require('gameplay.crit_line')
local Console = require('gameplay.console') local Console = require('gameplay.console')
local Gauge = require('gameplay.gauge') local Gauge = require('gameplay.gauge')
local Chain = require('gameplay.chain') local Chain = require('gameplay.chain')
local LaserAlert = require('gameplay.laser_alert')
local resx, resy = game.GetResolution() local resx, resy = game.GetResolution()
local desw, desh; local desw, desh;
@ -32,6 +33,8 @@ function render(deltaTime)
(game.GetSkinSetting('_gaugeARS') == 1) (game.GetSkinSetting('_gaugeARS') == 1)
); );
Chain.render(deltaTime, gameplay.comboState, chain, gameplay.critLine.x, gameplay.critLine.y); Chain.render(deltaTime, gameplay.comboState, chain, gameplay.critLine.x, gameplay.critLine.y);
LaserAlert.render(deltaTime);
end end
function render_crit_base(deltaTime) function render_crit_base(deltaTime)

View File

@ -0,0 +1,100 @@
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
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB