Skip to content

Commit

Permalink
整理代码 框架跟进
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Dec 2, 2024
1 parent b210785 commit 8b33230
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Zenitha
1 change: 1 addition & 0 deletions assets/game/acryPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ function AP:tickStep()
local list=self.acryProcessQueue.explosion
for i=1,#list do
local acry=list[i]
-- TODO
end
TABLE.clear(list)
end
Expand Down
10 changes: 3 additions & 7 deletions assets/game/basePlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -782,14 +782,10 @@ function P:initialize()
end
end
local dumpIgnore={
'P.soundTimeHistory',
'P.particles',
'P.texts',
['P.soundTimeHistory']=true,
['P.particles']=true,
['P.texts']=true,
}
for _,v in next,dumpIgnore do
dumpIgnore[v]=true
end
TABLE.clear(dumpIgnore)
local function dump(self,L,t,path)
local s='{'
local count=1
Expand Down
19 changes: 9 additions & 10 deletions assets/game/rectField.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local gc=love.graphics
local buffer=require"string.buffer"

---@class Techmino.RectField
---@field _width number
Expand Down Expand Up @@ -32,30 +33,28 @@ function F:export_table_simp()
return t
end
function F:export_string_simp()
local str=''
local buf=buffer.new((self._width+1)*#self._matrix)

for y=1,#self._matrix do
local buf=''
for x=1,self._width do
buf=buf..(self._matrix[y][x] and 'x' or '_')
buf:put(self._matrix[y][x] and 'x' or '_')
end
str=str..buf..'/'
buf:put('/')
end

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

for y=1,#self._matrix do
local buf=''
for x=1,self._width do
buf=buf..STRING.base64[self._matrix[y][x].color]
buf:put(STRING.toHex(self._matrix[y][x].color,2))
end
str=str..buf..'/'
buf:put('/')
end

return str
return buf:get()
end
function F:export_fumen()
local str=''
Expand Down
2 changes: 1 addition & 1 deletion assets/scene_app/link.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ local function resetBoard()
field.full=true
total=total*2

TABLE.clear(field)
TABLE.clearList(field)
for y=1,field.r do
field[y]={}
for x=1,field.c do
Expand Down
4 changes: 2 additions & 2 deletions assets/scene_app/piano.lua
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ local scene={}

local function stopAllSounds()
for _,effect in next,activeEventMap do effect:stop(FMOD.FMOD_STUDIO_STOP_ALLOWFADEOUT) end
TABLE.clearAll(activeEventMap)
TABLE.clearAll(objPool)
TABLE.clear(activeEventMap)
TABLE.clear(objPool)
end
function scene.load()
stopAllSounds()
Expand Down
2 changes: 1 addition & 1 deletion assets/vctrl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ end

function VCTRL.importSettings(data)
if not data then return end
TABLE.clear(VCTRL)
TABLE.clearList(VCTRL)
for i=1,#data do
local w=data[i]
VCTRL[i]=(
Expand Down

0 comments on commit 8b33230

Please sign in to comment.