整理代码
This commit is contained in:
@@ -564,16 +564,16 @@ function love.run()
|
||||
|
||||
--UPDATE
|
||||
STEP()
|
||||
TASK.update()
|
||||
WS.update(dt)
|
||||
VOC.update()
|
||||
BG.update(dt)
|
||||
TEXT.update()
|
||||
MES.update(dt)
|
||||
WS.update(dt)
|
||||
TASK.update()
|
||||
SYSFX.update(dt)
|
||||
if SCN.update then SCN.update(dt)end
|
||||
if SCN.swapping then SCN.swapUpdate()end
|
||||
WIDGET.update()
|
||||
TEXT.update()
|
||||
MES.update(dt)
|
||||
|
||||
--DRAW
|
||||
if not MINI()then
|
||||
|
||||
@@ -12,9 +12,9 @@ return{
|
||||
{name='drought_n', x=-400, y=0, size=40,shape=1,icon="drought", unlock={'drought_l'}},
|
||||
{name='drought_l', x=-600, y=0, size=40,shape=1,icon="mess"},
|
||||
|
||||
{name='dig_10l', x=-200, y=-400, size=40,shape=1,icon="dig_sprint", unlock={'dig_40l'}},
|
||||
{name='dig_40l', x=-400, y=-400, size=40,shape=1,icon="dig_sprint", unlock={'dig_100l'}},
|
||||
{name='dig_100l', x=-600, y=-400, size=40,shape=1,icon="dig_sprint", unlock={'dig_400l'}},
|
||||
{name='dig_10l', x=-200, y=-400, size=40,shape=1,icon="dig_sprint",unlock={'dig_40l'}},
|
||||
{name='dig_40l', x=-400, y=-400, size=40,shape=1,icon="dig_sprint",unlock={'dig_100l'}},
|
||||
{name='dig_100l', x=-600, y=-400, size=40,shape=1,icon="dig_sprint",unlock={'dig_400l'}},
|
||||
{name='dig_400l', x=-800, y=-200, size=40,shape=1,icon="dig_sprint"},
|
||||
|
||||
{name='marathon_n', x=0, y=-600, size=60,shape=1,icon="marathon",unlock={'marathon_h','rhythm_e','solo_e','round_e','blind_e','classic_fast','survivor_e','bigbang','zen'}},
|
||||
@@ -74,7 +74,7 @@ return{
|
||||
{name='dig_u', x=700, y=-1000,size=40,shape=1,icon="dig"},
|
||||
|
||||
{name='bigbang', x=400, y=-400, size=50,shape=1,icon="bigbang", unlock={'c4wtrain_n','pctrain_n','tech_n'}},
|
||||
{name='c4wtrain_n', x=700, y=-400, size=40,shape=1,icon="pc",unlock={'c4wtrain_l'}},
|
||||
{name='c4wtrain_n', x=700, y=-400, size=40,shape=1,icon="pc", unlock={'c4wtrain_l'}},
|
||||
{name='c4wtrain_l', x=900, y=-400, size=40,shape=1,icon="pc"},
|
||||
|
||||
{name='pctrain_n', x=700, y=-250, size=40,shape=1,icon="pc", unlock={'pctrain_l','pc_n'}},
|
||||
|
||||
@@ -584,18 +584,19 @@ function Player:resetBlock()--Reset Block's position and execute I*S
|
||||
end
|
||||
|
||||
function Player:spin(d,ifpre)
|
||||
local kickData=self.RS[self.cur.id]
|
||||
local cur=self.cur
|
||||
local kickData=self.RS[cur.id]
|
||||
if type(kickData)=='table'then
|
||||
local idir=(self.cur.dir+d)%4
|
||||
kickData=kickData[self.cur.dir*10+idir]
|
||||
local idir=(cur.dir+d)%4
|
||||
kickData=kickData[cur.dir*10+idir]
|
||||
if not kickData then
|
||||
self:freshBlock('move')
|
||||
SFX.play(ifpre and'prerotate'or'rotate',nil,self:getCenterX()*.15)
|
||||
return
|
||||
end
|
||||
local icb=BLOCKS[self.cur.id][idir]
|
||||
local isc=SCS[self.cur.id][idir]
|
||||
local ix,iy=self.curX+self.cur.sc[2]-isc[2],self.curY+self.cur.sc[1]-isc[1]
|
||||
local icb=BLOCKS[cur.id][idir]
|
||||
local isc=SCS[cur.id][idir]
|
||||
local ix,iy=self.curX+cur.sc[2]-isc[2],self.curY+cur.sc[1]-isc[1]
|
||||
for test=1,#kickData do
|
||||
local x,y=ix+kickData[test][1],iy+kickData[test][2]
|
||||
if not self:ifoverlap(icb,x,y)and(self.freshTime>0 or kickData[test][2]<=0)then
|
||||
@@ -603,8 +604,8 @@ function Player:spin(d,ifpre)
|
||||
if self.gameEnv.moveFX and self.gameEnv.block then
|
||||
self:createMoveFX()
|
||||
end
|
||||
self.curX,self.curY,self.cur.dir=ix,iy,idir
|
||||
self.cur.sc,self.cur.bk=isc,icb
|
||||
self.curX,self.curY,cur.dir=ix,iy,idir
|
||||
cur.sc,cur.bk=isc,icb
|
||||
self.spinLast=test==2 and 0 or 1
|
||||
|
||||
local t=self.freshTime
|
||||
|
||||
Reference in New Issue
Block a user