diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index d152053..ea2cdaa 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -66,7 +66,7 @@ end function render_crit_base(deltaTime) HitFX.renderLasers(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors); - CritLine.renderBase(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors); + CritLine.renderBase(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation, gameplay.critLine.cursors, gameplay.laserActive); Console.render(deltaTime, gameplay.critLine.x, gameplay.critLine.y, -gameplay.critLine.rotation); end diff --git a/scripts/gameplay/crit_line.lua b/scripts/gameplay/crit_line.lua index 0541641..a558e8b 100644 --- a/scripts/gameplay/crit_line.lua +++ b/scripts/gameplay/crit_line.lua @@ -17,6 +17,10 @@ local cursorGlowTopImages = { gfx.CreateSkinImage("gameplay/crit_line/cursor_glow_top_left.png", 0), gfx.CreateSkinImage("gameplay/crit_line/cursor_glow_top_right.png", 0), } +local cursorTailImages = { + gfx.CreateSkinImage("gameplay/crit_line/cursor_tail_l.png", 0), + gfx.CreateSkinImage("gameplay/crit_line/cursor_tail_r.png", 0), +} local CRITBAR_W = 1080 local CRITBAR_H = 251 @@ -24,10 +28,15 @@ local CRITBAR_H = 251 local scale = 1; local isLandscape = false; -local drawCursors = function (centerX, centerY,cursors) +local drawCursors = function (centerX, centerY,cursors, laserActive) local cursorW = 598 * 0.165; local cursorH = 673 * 0.14; + + local tailW = cursorW * 9 + local tailH = cursorH * 9 + for i = 0, 1, 1 do + local luaIndex = i + 1 local cursor = cursors[i]; gfx.Save(); @@ -39,6 +48,18 @@ local drawCursors = function (centerX, centerY,cursors) local cursorX = cursor.pos * (1 / scale) - cursorW / 2; local cursorY = -cursorH / 2; + if laserActive[luaIndex] then + gfx.ImageRect( + cursor.pos - tailW / 2, + - tailH / 2, + tailW, + tailH, + cursorTailImages[luaIndex], + cursor.alpha, + 0 + ) + end + gfx.ImageRect( cursorX, cursorY, @@ -54,7 +75,7 @@ local drawCursors = function (centerX, centerY,cursors) cursorY, cursorW, cursorH, - cursorGlowBottomImages[i+1], + cursorGlowBottomImages[luaIndex], cursor.alpha, 0 ); @@ -74,7 +95,7 @@ local drawCursors = function (centerX, centerY,cursors) cursorY, cursorW, cursorH, - cursorGlowTopImages[i+1], + cursorGlowTopImages[luaIndex], cursor.alpha, 0 ); @@ -83,7 +104,7 @@ local drawCursors = function (centerX, centerY,cursors) end end -local renderBase = function (deltaTime, centerX, centerY, rotation, cursors) +local renderBase = function (deltaTime, centerX, centerY, rotation, cursors, laserActive) scale, isLandscape = Dimensions.setUpTransforms(centerX, centerY, rotation) gfx.BeginPath() @@ -99,7 +120,7 @@ local renderBase = function (deltaTime, centerX, centerY, rotation, cursors) gfx.ImageRect(-CRITBAR_W/2, -CRITBAR_H/2, CRITBAR_W, CRITBAR_H, baseImage, 1, 0); end - drawCursors(centerX, centerY, cursors) + drawCursors(centerX, centerY, cursors, laserActive) gfx.ResetTransform() end diff --git a/textures/gameplay/crit_line/cursor_tail_l.png b/textures/gameplay/crit_line/cursor_tail_l.png new file mode 100644 index 0000000..f94892e Binary files /dev/null and b/textures/gameplay/crit_line/cursor_tail_l.png differ diff --git a/textures/gameplay/crit_line/cursor_tail_r.png b/textures/gameplay/crit_line/cursor_tail_r.png new file mode 100644 index 0000000..e77f1dc Binary files /dev/null and b/textures/gameplay/crit_line/cursor_tail_r.png differ