Skip to content

Commit

Permalink
方块和气泡添加当前块描边
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Jan 9, 2024
1 parent 1bb696d commit 1f5d79a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/skin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ local function _getTime() return SKIN.time end
---@field drawGarbageBuffer fun(garbageBuffer:table)
---@field drawLockDelayIndicator fun(freshCondition:string, freshChance:number)
---@field drawGhost fun(B:table, handX:number, ghostY:number)
---@field drawHandStroke fun(B:table, handX:number, handY:number)
---@field drawHand fun(B:table, handX:number, handY:number)
---@field drawNextBorder fun(slot:number)
---@field drawNext fun(n:number, B:table, unavailable:boolean)
Expand Down
10 changes: 10 additions & 0 deletions assets/skin/mino_template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ function S.drawGhost(B,handX,ghostY)
end end
end

local r=4
function S.drawHandStroke(B,handX,handY)
gc_setColor(1,1,1)
for y=1,#B do for x=1,#B[1] do
if B[y][x] then
gc_rectangle('fill',(handX+x-2)*40-r,-(handY+y-1)*40-r,40+2*r,40+2*r)
end
end end
end

function S.drawHand(B,handX,handY)
for y=1,#B do for x=1,#B[1] do
if B[y][x] then
Expand Down
10 changes: 10 additions & 0 deletions assets/skin/puyo_template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ function S.drawGhost(B,handX,ghostY)
end end
end

local r=4
function S.drawHandStroke(B,handX,handY)
gc_setColor(1,1,1)
for y=1,#B do for x=1,#B[1] do
if B[y][x] then
gc_rectangle('fill',(handX+x-2)*40+2-r,-(handY+y-1)*40+2-r,36+2*r,36+2*r,15)
end
end end
end

function S.drawHand(B,handX,handY)
for y=1,#B do for x=1,#B[1] do
if B[y][x] then
Expand Down

0 comments on commit 1f5d79a

Please sign in to comment.