dropPiece事件改名hook_drop

This commit is contained in:
MrZ626
2021-11-12 23:20:29 +08:00
parent fce08c83ef
commit 8cbb4a38bc
62 changed files with 78 additions and 77 deletions

View File

@@ -61,7 +61,7 @@ return{
noInitSZO=false,
mesDisp={},
dropPiece={},
hook_drop={},
task={},
eventSet="X",

View File

@@ -303,7 +303,7 @@ local function _applyGameEnv(P)--Finish gameEnv processing
--Apply events
ENV.mesDisp=_mergeFuncTable(ENV.mesDisp,{})
ENV.dropPiece=_mergeFuncTable(ENV.dropPiece,{})
ENV.hook_drop=_mergeFuncTable(ENV.hook_drop,{})
ENV.task=_mergeFuncTable(ENV.task,{})
--Apply eventSet
@@ -314,7 +314,7 @@ local function _applyGameEnv(P)--Finish gameEnv processing
for k,v in next,eventSet do
if
k=='mesDisp'or
k=='dropPiece'or
k=='hook_drop'or
k=='task'
then
_mergeFuncTable(v,ENV[k])

View File

@@ -314,7 +314,7 @@ function Player:setRS(RSname)
end
function Player:triggerDropEvents()
local L=self.gameEnv.dropPiece
local L=self.gameEnv.hook_drop
for i=1,#L do
L[i](self)
end
@@ -2333,7 +2333,9 @@ function Player:revive()
SFX.play('emit')
end
function Player:win(result)
if self.result then return end
if self.result then
return
end
self:_die()
self.result='win'
if GAME.modeEnv.royaleMode then
@@ -2374,8 +2376,7 @@ function Player:lose(force)
if self.life>0 then
self:revive()
return
end
if self.type=='remote'then
elseif self.type=='remote'then
self.waiting=1e99
return
end