修复玩家类setHold方法,applyGameEnv函数使用更多的set初始化
This commit is contained in:
@@ -110,13 +110,6 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
P.color[_]=SKIN.libColor[ENV.skin[_]]
|
||||
end
|
||||
|
||||
P.keepVisible=ENV.visible=="show"
|
||||
P.showTime=
|
||||
ENV.visible=="show"and 1e99 or
|
||||
ENV.visible=="time"and 300 or
|
||||
ENV.visible=="fast"and 20 or
|
||||
ENV.visible=="none"and 0
|
||||
|
||||
P.life=ENV.life
|
||||
|
||||
P.keyAvailable={true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}
|
||||
@@ -132,14 +125,14 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
P.keyAvailable[v]=false
|
||||
virtualkey[v].ava=false
|
||||
end
|
||||
if P._20G then
|
||||
P.keyAvailable[7]=false
|
||||
virtualkey[7].ava=false
|
||||
end
|
||||
if not ENV.hold then
|
||||
P.keyAvailable[8]=false
|
||||
virtualkey[8].ava=false
|
||||
end
|
||||
P:setInvisible(
|
||||
ENV.visible=="show"and -1 or
|
||||
ENV.visible=="time"and 300 or
|
||||
ENV.visible=="fast"and 20 or
|
||||
ENV.visible=="none"and 0
|
||||
)
|
||||
P:set20G(P._20G)
|
||||
P:setHold(ENV.hold)
|
||||
|
||||
if type(ENV.mission)=="table"then
|
||||
P.curMission=1
|
||||
|
||||
@@ -115,8 +115,8 @@ function Player.set20G(P,if20g,init)
|
||||
end
|
||||
function Player.setHold(P,ifhold)
|
||||
P.gameEnv.hold=ifhold
|
||||
P.keyAvailable[8]=not ifhold
|
||||
virtualkey[8].ava=not ifhold
|
||||
P.keyAvailable[8]=ifhold
|
||||
virtualkey[8].ava=ifhold
|
||||
if not ifhold then
|
||||
P.hd=nil
|
||||
end
|
||||
@@ -127,6 +127,7 @@ end
|
||||
function Player.setInvisible(P,time)
|
||||
if time<0 then
|
||||
P.keepVisible=true
|
||||
P.showTime=1e99
|
||||
else
|
||||
P.keepVisible=false
|
||||
P.showTime=time
|
||||
|
||||
Reference in New Issue
Block a user