代码整理
This commit is contained in:
@@ -2,7 +2,7 @@ local gc=love.graphics
|
|||||||
local int=math.floor
|
local int=math.floor
|
||||||
local format=string.format
|
local format=string.format
|
||||||
|
|
||||||
do
|
do--setFont
|
||||||
local newFont=gc.setNewFont
|
local newFont=gc.setNewFont
|
||||||
local setNewFont=gc.setFont
|
local setNewFont=gc.setFont
|
||||||
local fontCache,currentFontSize={}
|
local fontCache,currentFontSize={}
|
||||||
|
|||||||
@@ -209,13 +209,14 @@ function freshMostBadge()
|
|||||||
game.mostBadge,game.secBadge=nil
|
game.mostBadge,game.secBadge=nil
|
||||||
local m,m2=0,0
|
local m,m2=0,0
|
||||||
for i=1,#players.alive do
|
for i=1,#players.alive do
|
||||||
local h=players.alive[i].badge
|
local P=players.alive[i]
|
||||||
if h>=m then
|
local b=P.badge
|
||||||
game.mostBadge,game.secBadge=players.alive[i],game.mostBadge
|
if b>=m then
|
||||||
m,m2=h,m
|
game.mostBadge,game.secBadge=P,game.mostBadge
|
||||||
elseif h>=m2 then
|
m,m2=b,m
|
||||||
game.secBadge=players.alive[i]
|
elseif b>=m2 then
|
||||||
m2=h
|
game.secBadge=P
|
||||||
|
m2=b
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
local gc=love.graphics
|
|
||||||
local Tick={}
|
local Tick={}
|
||||||
function Tick.finish(P)
|
function Tick.finish(P)
|
||||||
P.endCounter=P.endCounter+1
|
P.endCounter=P.endCounter+1
|
||||||
|
|||||||
Reference in New Issue
Block a user