修复玩家类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[_]]
|
P.color[_]=SKIN.libColor[ENV.skin[_]]
|
||||||
end
|
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.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}
|
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
|
P.keyAvailable[v]=false
|
||||||
virtualkey[v].ava=false
|
virtualkey[v].ava=false
|
||||||
end
|
end
|
||||||
if P._20G then
|
P:setInvisible(
|
||||||
P.keyAvailable[7]=false
|
ENV.visible=="show"and -1 or
|
||||||
virtualkey[7].ava=false
|
ENV.visible=="time"and 300 or
|
||||||
end
|
ENV.visible=="fast"and 20 or
|
||||||
if not ENV.hold then
|
ENV.visible=="none"and 0
|
||||||
P.keyAvailable[8]=false
|
)
|
||||||
virtualkey[8].ava=false
|
P:set20G(P._20G)
|
||||||
end
|
P:setHold(ENV.hold)
|
||||||
|
|
||||||
if type(ENV.mission)=="table"then
|
if type(ENV.mission)=="table"then
|
||||||
P.curMission=1
|
P.curMission=1
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ function Player.set20G(P,if20g,init)
|
|||||||
end
|
end
|
||||||
function Player.setHold(P,ifhold)
|
function Player.setHold(P,ifhold)
|
||||||
P.gameEnv.hold=ifhold
|
P.gameEnv.hold=ifhold
|
||||||
P.keyAvailable[8]=not ifhold
|
P.keyAvailable[8]=ifhold
|
||||||
virtualkey[8].ava=not ifhold
|
virtualkey[8].ava=ifhold
|
||||||
if not ifhold then
|
if not ifhold then
|
||||||
P.hd=nil
|
P.hd=nil
|
||||||
end
|
end
|
||||||
@@ -127,6 +127,7 @@ end
|
|||||||
function Player.setInvisible(P,time)
|
function Player.setInvisible(P,time)
|
||||||
if time<0 then
|
if time<0 then
|
||||||
P.keepVisible=true
|
P.keepVisible=true
|
||||||
|
P.showTime=1e99
|
||||||
else
|
else
|
||||||
P.keepVisible=false
|
P.keepVisible=false
|
||||||
P.showTime=time
|
P.showTime=time
|
||||||
|
|||||||
Reference in New Issue
Block a user