整理代码,跟进之前的整理玩家方法
This commit is contained in:
@@ -74,9 +74,11 @@ function Player:clearLockFX()
|
||||
end
|
||||
end
|
||||
function Player:createDropFX()
|
||||
local CB=self.cur.bk
|
||||
if self.gameEnv.dropFX and self.gameEnv.block and self.curY-self.ghoY-#CB>-1 then
|
||||
ins(self.dropFX,{self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1,0,13-2*self.gameEnv.dropFX})
|
||||
if self.gameEnv.dropFX and self.gameEnv.block then
|
||||
local CB=self.cur.bk
|
||||
if self.curY-self.ghoY+1>#CB then
|
||||
ins(self.dropFX,{self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1,0,13-2*self.gameEnv.dropFX})
|
||||
end
|
||||
end
|
||||
end
|
||||
function Player:createMoveFX(moveDir)
|
||||
|
||||
@@ -417,9 +417,7 @@ function update.remote_alive(P,dt)
|
||||
for _,p in next,PLY_ALIVE do
|
||||
if p.sid==sid then
|
||||
P:attack(p,amount,time,line,true)
|
||||
if P.gameEnv.atkFX then
|
||||
P:createBeam(p,amount,P.gameEnv.atkFX,P.cur.color)
|
||||
end
|
||||
P:createBeam(p,amount)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user