整理代码

This commit is contained in:
MrZ626
2020-11-28 19:07:50 +08:00
parent 2381dca463
commit 41a9f6f16d
4 changed files with 7 additions and 10 deletions

View File

@@ -84,7 +84,7 @@ function FXdraw.shade(S)
setColor(S.r,S.g,S.b,1-S.t)
gc.rectangle("fill",S.x,S.y,S.w,S.h,2)
end
function FXdraw.cell(S,dt)
function FXdraw.cell(S)
setColor(1,1,1,1-S.t)
gc.draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy)
end

View File

@@ -20,7 +20,7 @@ MODOPT={--Mod options
},
infHold={no=3,id="IH",
key="r",x=440,y=230,color="water",
func=function(P,M)P.gameEnv.infHold=true end,
func=function(P)P.gameEnv.infHold=true end,
unranked=true,
},
hideBlock={no=4,id="HB",
@@ -126,7 +126,7 @@ MODOPT={--Mod options
},
boneBlock={no=21,id="BN",
key="m",x=920,y=470,color="blue",
func=function(P,M)P.gameEnv.bone=true end,
func=function(P)P.gameEnv.bone=true end,
},
}
for _,M in next,MODOPT do

View File

@@ -6,7 +6,6 @@ local Player={}--Player class
local int,ceil,rnd=math.floor,math.ceil,math.random
local max,min=math.max,math.min
local sin,cos=math.sin,math.cos
local ins,rem=table.insert,table.remove
local kickList=require"parts/kickList"

View File

@@ -2,10 +2,8 @@ local gc=love.graphics
local kb=love.keyboard
local tc=love.touch
local function sign(a)return a>0 and 1 or -1 end
local rnd,int,abs=math.random,math.floor,math.abs
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
local Timer=love.timer.getTime
local max,min=math.max,math.min
local setFont=setFont
local cubeColor={
@@ -128,7 +126,7 @@ end
function Tmr.mg_cubefield(dt)
dt=dt*600
--Update cubes' position
local cy=cubesY
local step=speed*dt*.005
@@ -273,7 +271,7 @@ function Pnt.mg_cubefield()
gc.setColor(1,1,1,(1-ct/60)*.2)
gc.polygon("fill",-18,20,0,-440,18,200)
gc.setColor(1,1,1,ct/60)
setFont(90)
@@ -288,7 +286,7 @@ function Pnt.mg_cubefield()
if score>0 then
mStr("Score : "..score,0,-350)
end
mStr(MOBILE and"Touch to Start"or"Press space",0,-160)
end
gc.pop()