目标行数线加入玩家绘图方法

This commit is contained in:
MrZ626
2020-09-10 18:29:20 +08:00
parent f6deb34121
commit 98d45d57a3
8 changed files with 15 additions and 42 deletions

View File

@@ -12,16 +12,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=40-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=10-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=100-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=1000-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=20-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=40-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=400-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
P:drawTargetLine(r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,

View File

@@ -999,6 +999,14 @@ local function Pdraw_demo(P)
TEXT.draw(P.bonus)
gc.pop()
end
function player.drawTargetLine(P,r)
if r<21+(P.fieldBeneath+P.fieldUp)/30 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y+P.fieldBeneath+P.fieldUp
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
end
--------------------------</Paint>--------------------------
--------------------------<Lib Func>--------------------------