整理代码,royaleData改为全大写,放入globalTables文件全局变量定义
This commit is contained in:
@@ -478,21 +478,19 @@ do--function drawFWM()
|
|||||||
mStr(m[_G["\83\69\84\84\73\78\71"]["\108\97\110\103"]or m[1]],240,60+26*sin(t))
|
mStr(m[_G["\83\69\84\84\73\78\71"]["\108\97\110\103"]or m[1]],240,60+26*sin(t))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
do--function drawSelfProfile()
|
function drawSelfProfile()
|
||||||
function drawSelfProfile()
|
local selfAvatar=USERS.getAvatar(USER.uid)
|
||||||
local selfAvatar=USERS.getAvatar(USER.uid)
|
gc_push("transform")
|
||||||
gc_push("transform")
|
gc_translate(1280,0)
|
||||||
gc_translate(1280,0)
|
|
||||||
|
|
||||||
--Draw avatar
|
--Draw avatar
|
||||||
gc_setLineWidth(2)
|
gc_setLineWidth(2)
|
||||||
gc_setColor(.3,.3,.3,.8)gc_rectangle("fill",-260,0,260,80)
|
gc_setColor(.3,.3,.3,.8)gc_rectangle("fill",-260,0,260,80)
|
||||||
gc_setColor(1,1,1)gc_rectangle("line",-260,0,260,80)
|
gc_setColor(1,1,1)gc_rectangle("line",-260,0,260,80)
|
||||||
gc_rectangle("line",-73,7,66,66,2)
|
gc_rectangle("line",-73,7,66,66,2)
|
||||||
gc_draw(selfAvatar,-72,8,nil,.5)
|
gc_draw(selfAvatar,-72,8,nil,.5)
|
||||||
|
|
||||||
gc_pop()
|
gc_pop()
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function drawWarning()
|
function drawWarning()
|
||||||
if SETTING.warn and GAME.warnLVL>0 then
|
if SETTING.warn and GAME.warnLVL>0 then
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ GAME={--Global game data
|
|||||||
mostDangerous=false,--Most dangerous player
|
mostDangerous=false,--Most dangerous player
|
||||||
secDangerous=false, --Second dangerous player
|
secDangerous=false, --Second dangerous player
|
||||||
}
|
}
|
||||||
|
ROYALEDATA={
|
||||||
|
powerUp=false,
|
||||||
|
stage=false,
|
||||||
|
}
|
||||||
|
|
||||||
--Userdata tables
|
--Userdata tables
|
||||||
RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes
|
RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ return{
|
|||||||
bg="rainbow",bgm="sugar fairy",
|
bg="rainbow",bgm="sugar fairy",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
royaleData={
|
ROYALEDATA.powerUp={2,5,10,20}
|
||||||
powerUp={2,5,10,20},
|
ROYALEDATA.stage={30,20,15,10,5}
|
||||||
stage={30,20,15,10,5},
|
|
||||||
}
|
|
||||||
PLY.newPlayer(1)
|
PLY.newPlayer(1)
|
||||||
local L={}for i=1,49 do L[i]=true end
|
local L={}for i=1,49 do L[i]=true end
|
||||||
local t=CC and 2 or 0
|
local t=CC and 2 or 0
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ return{
|
|||||||
bg="rainbow",bgm="rockblock",
|
bg="rainbow",bgm="rockblock",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
royaleData={
|
ROYALEDATA.powerUp={2,5,10,20}
|
||||||
powerUp={2,5,10,20},
|
ROYALEDATA.stage={30,20,15,10,5}
|
||||||
stage={30,20,15,10,5},
|
|
||||||
}
|
|
||||||
PLY.newPlayer(1)
|
PLY.newPlayer(1)
|
||||||
local L={}for i=1,49 do L[i]=true end
|
local L={}for i=1,49 do L[i]=true end
|
||||||
local t=CC and 4 or 0
|
local t=CC and 4 or 0
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ return{
|
|||||||
bg="rainbow",bgm="magicblock",
|
bg="rainbow",bgm="magicblock",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
royaleData={
|
ROYALEDATA.powerUp={2,5,10,20}
|
||||||
powerUp={2,5,10,20},
|
ROYALEDATA.stage={30,20,15,10,5}
|
||||||
stage={30,20,15,10,5},
|
|
||||||
}
|
|
||||||
PLY.newPlayer(1)
|
PLY.newPlayer(1)
|
||||||
local L={}for i=1,49 do L[i]=true end
|
local L={}for i=1,49 do L[i]=true end
|
||||||
local t=CC and 6 or 0
|
local t=CC and 6 or 0
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ return{
|
|||||||
bg="rainbow",bgm="sugar fairy",
|
bg="rainbow",bgm="sugar fairy",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
royaleData={
|
ROYALEDATA.powerUp={2,6,14,30}
|
||||||
powerUp={2,6,14,30},
|
ROYALEDATA.stage={75,50,35,20,10}
|
||||||
stage={75,50,35,20,10},
|
|
||||||
}
|
|
||||||
PLY.newPlayer(1)
|
PLY.newPlayer(1)
|
||||||
local L={}for i=1,100 do L[i]=true end
|
local L={}for i=1,100 do L[i]=true end
|
||||||
local t=CC and 4 or 0
|
local t=CC and 4 or 0
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ return{
|
|||||||
bg="rainbow",bgm="rockblock",
|
bg="rainbow",bgm="rockblock",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
royaleData={
|
ROYALEDATA.powerUp={2,6,14,30}
|
||||||
powerUp={2,6,14,30},
|
ROYALEDATA.stage={75,50,35,20,10}
|
||||||
stage={75,50,35,20,10},
|
|
||||||
}
|
|
||||||
PLY.newPlayer(1)
|
PLY.newPlayer(1)
|
||||||
local L={}for i=1,100 do L[i]=true end
|
local L={}for i=1,100 do L[i]=true end
|
||||||
local t=CC and 4 or 0
|
local t=CC and 4 or 0
|
||||||
|
|||||||
@@ -28,10 +28,8 @@ return{
|
|||||||
bg="rainbow",bgm="magicblock",
|
bg="rainbow",bgm="magicblock",
|
||||||
},
|
},
|
||||||
load=function()
|
load=function()
|
||||||
royaleData={
|
ROYALEDATA.powerUp={2,6,14,30}
|
||||||
powerUp={2,6,14,30},
|
ROYALEDATA.stage={75,50,35,20,10}
|
||||||
stage={75,50,35,20,10},
|
|
||||||
}
|
|
||||||
PLY.newPlayer(1)
|
PLY.newPlayer(1)
|
||||||
local L={}for i=1,100 do L[i]=true end
|
local L={}for i=1,100 do L[i]=true end
|
||||||
local t=CC and 4 or 0
|
local t=CC and 4 or 0
|
||||||
|
|||||||
@@ -1798,7 +1798,7 @@ function Player:lose(force)
|
|||||||
end
|
end
|
||||||
A.modeData.ko,A.badge=A.modeData.ko+1,A.badge+self.badge+1
|
A.modeData.ko,A.badge=A.modeData.ko+1,A.badge+self.badge+1
|
||||||
for j=A.strength+1,4 do
|
for j=A.strength+1,4 do
|
||||||
if A.badge>=royaleData.powerUp[j]then
|
if A.badge>=ROYALEDATA.powerUp[j]then
|
||||||
A.strength=j
|
A.strength=j
|
||||||
A.frameColor=A.strength
|
A.frameColor=A.strength
|
||||||
end
|
end
|
||||||
@@ -1814,7 +1814,7 @@ function Player:lose(force)
|
|||||||
|
|
||||||
freshMostBadge()
|
freshMostBadge()
|
||||||
freshMostDangerous()
|
freshMostDangerous()
|
||||||
if #PLY_ALIVE==royaleData.stage[GAME.stage]then
|
if #PLY_ALIVE==ROYALEDATA.stage[GAME.stage]then
|
||||||
royaleLevelup()
|
royaleLevelup()
|
||||||
end
|
end
|
||||||
self:showTextF(self.modeData.place,0,120,60,"appear",.26,.9)
|
self:showTextF(self.modeData.place,0,120,60,"appear",.26,.9)
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ function scene.sceneInit()
|
|||||||
|
|
||||||
--Set quick-play-button text
|
--Set quick-play-button text
|
||||||
scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1])
|
scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1])
|
||||||
quickSure=false
|
|
||||||
|
|
||||||
--Create demo player
|
--Create demo player
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
|
|||||||
Reference in New Issue
Block a user