Skip to content

Commit 8b33230

Browse files
committed
整理代码 框架跟进
1 parent b210785 commit 8b33230

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

assets/game/acryPlayer.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ function AP:tickStep()
568568
local list=self.acryProcessQueue.explosion
569569
for i=1,#list do
570570
local acry=list[i]
571+
-- TODO
571572
end
572573
TABLE.clear(list)
573574
end

assets/game/basePlayer.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -782,14 +782,10 @@ function P:initialize()
782782
end
783783
end
784784
local dumpIgnore={
785-
'P.soundTimeHistory',
786-
'P.particles',
787-
'P.texts',
785+
['P.soundTimeHistory']=true,
786+
['P.particles']=true,
787+
['P.texts']=true,
788788
}
789-
for _,v in next,dumpIgnore do
790-
dumpIgnore[v]=true
791-
end
792-
TABLE.clear(dumpIgnore)
793789
local function dump(self,L,t,path)
794790
local s='{'
795791
local count=1

assets/game/rectField.lua

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local gc=love.graphics
2+
local buffer=require"string.buffer"
23

34
---@class Techmino.RectField
45
---@field _width number
@@ -32,30 +33,28 @@ function F:export_table_simp()
3233
return t
3334
end
3435
function F:export_string_simp()
35-
local str=''
36+
local buf=buffer.new((self._width+1)*#self._matrix)
3637

3738
for y=1,#self._matrix do
38-
local buf=''
3939
for x=1,self._width do
40-
buf=buf..(self._matrix[y][x] and 'x' or '_')
40+
buf:put(self._matrix[y][x] and 'x' or '_')
4141
end
42-
str=str..buf..'/'
42+
buf:put('/')
4343
end
4444

45-
return str
45+
return buf:get()
4646
end
4747
function F:export_string_color()
48-
local str=''
48+
local buf=buffer.new((self._width*2+1)*#self._matrix)
4949

5050
for y=1,#self._matrix do
51-
local buf=''
5251
for x=1,self._width do
53-
buf=buf..STRING.base64[self._matrix[y][x].color]
52+
buf:put(STRING.toHex(self._matrix[y][x].color,2))
5453
end
55-
str=str..buf..'/'
54+
buf:put('/')
5655
end
5756

58-
return str
57+
return buf:get()
5958
end
6059
function F:export_fumen()
6160
local str=''

assets/scene_app/link.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ local function resetBoard()
7878
field.full=true
7979
total=total*2
8080

81-
TABLE.clear(field)
81+
TABLE.clearList(field)
8282
for y=1,field.r do
8383
field[y]={}
8484
for x=1,field.c do

assets/scene_app/piano.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ local scene={}
413413

414414
local function stopAllSounds()
415415
for _,effect in next,activeEventMap do effect:stop(FMOD.FMOD_STUDIO_STOP_ALLOWFADEOUT) end
416-
TABLE.clearAll(activeEventMap)
417-
TABLE.clearAll(objPool)
416+
TABLE.clear(activeEventMap)
417+
TABLE.clear(objPool)
418418
end
419419
function scene.load()
420420
stopAllSounds()

assets/vctrl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ end
433433

434434
function VCTRL.importSettings(data)
435435
if not data then return end
436-
TABLE.clear(VCTRL)
436+
TABLE.clearList(VCTRL)
437437
for i=1,#data do
438438
local w=data[i]
439439
VCTRL[i]=(

0 commit comments

Comments
 (0)