diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index 46137b3..92601ce 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -6,6 +6,7 @@ local CritLine = require('gameplay.crit_line') local Console = require('gameplay.console') local Gauge = require('gameplay.gauge') local Chain = require('gameplay.chain') +local LaserAlert = require('gameplay.laser_alert') local resx, resy = game.GetResolution() local desw, desh; @@ -32,6 +33,8 @@ function render(deltaTime) (game.GetSkinSetting('_gaugeARS') == 1) ); Chain.render(deltaTime, gameplay.comboState, chain, gameplay.critLine.x, gameplay.critLine.y); + + LaserAlert.render(deltaTime); end function render_crit_base(deltaTime) diff --git a/scripts/gameplay/laser_alert.lua b/scripts/gameplay/laser_alert.lua new file mode 100644 index 0000000..a421ebb --- /dev/null +++ b/scripts/gameplay/laser_alert.lua @@ -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 +} \ No newline at end of file diff --git a/textures/gameplay/laser_alert/left/base.png b/textures/gameplay/laser_alert/left/base.png new file mode 100644 index 0000000..f03d531 Binary files /dev/null and b/textures/gameplay/laser_alert/left/base.png differ diff --git a/textures/alert_l.png b/textures/gameplay/laser_alert/left/text.png similarity index 100% rename from textures/alert_l.png rename to textures/gameplay/laser_alert/left/text.png diff --git a/textures/gameplay/laser_alert/left/top.png b/textures/gameplay/laser_alert/left/top.png new file mode 100644 index 0000000..974a7c4 Binary files /dev/null and b/textures/gameplay/laser_alert/left/top.png differ diff --git a/textures/gameplay/laser_alert/right/base.png b/textures/gameplay/laser_alert/right/base.png new file mode 100644 index 0000000..68e1c82 Binary files /dev/null and b/textures/gameplay/laser_alert/right/base.png differ diff --git a/textures/alert_r.png b/textures/gameplay/laser_alert/right/text.png similarity index 100% rename from textures/alert_r.png rename to textures/gameplay/laser_alert/right/text.png diff --git a/textures/gameplay/laser_alert/right/top.png b/textures/gameplay/laser_alert/right/top.png new file mode 100644 index 0000000..007e93f Binary files /dev/null and b/textures/gameplay/laser_alert/right/top.png differ