整理代码
This commit is contained in:
@@ -172,11 +172,7 @@ function love.keypressed(i)
|
|||||||
mouseShow=false
|
mouseShow=false
|
||||||
if devMode then
|
if devMode then
|
||||||
if i=="f1"then PROFILE.switch()
|
if i=="f1"then PROFILE.switch()
|
||||||
elseif i=="f2"then
|
elseif i=="f2"then LOG.print(string.format("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s",SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))
|
||||||
LOG.print("System:"..SYSTEM.."["..jit.arch.."]")
|
|
||||||
LOG.print("luaVer:".._VERSION)
|
|
||||||
LOG.print("jitVer:"..jit.version)
|
|
||||||
LOG.print("jitVerNum:"..jit.version_num)
|
|
||||||
elseif i=="f3"then
|
elseif i=="f3"then
|
||||||
for _=1,8 do
|
for _=1,8 do
|
||||||
local P=PLAYERS.alive[rnd(#PLAYERS.alive)]
|
local P=PLAYERS.alive[rnd(#PLAYERS.alive)]
|
||||||
@@ -218,16 +214,16 @@ function love.keypressed(i)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
::NORMAL::
|
::NORMAL::
|
||||||
if i~="f8"then
|
if i=="f8"then
|
||||||
|
devMode=1
|
||||||
|
LOG.print("DEBUG ON",COLOR.yellow)
|
||||||
|
else
|
||||||
if SCN.swapping then return end
|
if SCN.swapping then return end
|
||||||
|
|
||||||
if SCN.keyDown then SCN.keyDown(i)
|
if SCN.keyDown then SCN.keyDown(i)
|
||||||
elseif i=="escape"then SCN.back()
|
elseif i=="escape"then SCN.back()
|
||||||
else WIDGET.keyPressed(i)
|
else WIDGET.keyPressed(i)
|
||||||
end
|
end
|
||||||
else
|
|
||||||
devMode=1
|
|
||||||
LOG.print("DEBUG ON",COLOR.yellow)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.keyreleased(i)
|
function love.keyreleased(i)
|
||||||
|
|||||||
@@ -216,8 +216,7 @@ function scene.update(dt)
|
|||||||
|
|
||||||
--Update players
|
--Update players
|
||||||
for p=1,#PLAYERS do
|
for p=1,#PLAYERS do
|
||||||
local P=PLAYERS[p]
|
PLAYERS[p]:update(dt)
|
||||||
P:update(dt)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--Fresh royale target
|
--Fresh royale target
|
||||||
|
|||||||
Reference in New Issue
Block a user