From cc31cc3e389137fe42ae5ee01afd0528766e5cd6 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Wed, 10 Jan 2024 11:07:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/game/gemPlayer.lua | 12 ++++----- assets/game/minoPlayer.lua | 50 +++++++++++++++++++------------------- assets/game/puyoPlayer.lua | 34 +++++++++++++------------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/assets/game/gemPlayer.lua b/assets/game/gemPlayer.lua index ab84a627..a6b302f4 100644 --- a/assets/game/gemPlayer.lua +++ b/assets/game/gemPlayer.lua @@ -762,8 +762,8 @@ function GP:updateFrame() end end function GP:render() - local settings=self.settings - local skin=SKIN.get(settings.skin) + local SET=self.settings + local skin=SKIN.get(SET.skin) SKIN.time=self.time gc_push('transform') @@ -783,12 +783,12 @@ function GP:render() -- Start field stencil GC.stc_setComp() GC.stc_rect(0,0,720,-720) - gc_scale(16/settings.fieldSize) + gc_scale(16/SET.fieldSize) self:triggerEvent('drawBelowField') -- From frame's bottom-left, 40px a cell -- Grid & Cells - skin.drawFieldBackground(settings.fieldSize) + skin.drawFieldBackground(SET.fieldSize) local F=self.field for y=1,#F do for x=1,#F[1] do local C=F[y][x] @@ -833,8 +833,8 @@ function GP:render() self:triggerEvent('drawOnPlayer') -- From player's center -- Starting counter - if self.time0 then for n=1,#self.floatHolds do local H=self.floatHolds[n] - skin.drawFloatHold(n,H.hand.matrix,H.handX,H.handY,settings.holdMode=='float' and not settings.infHold and n<=self.holdTime) + skin.drawFloatHold(n,H.hand.matrix,H.handX,H.handY,SET.holdMode=='float' and not SET.infHold and n<=self.holdTime) end end @@ -1754,12 +1754,12 @@ function MP:render() -- Height lines skin.drawHeightLines( -- All unit are pixel - settings.fieldW*40, -- Field Width - (settings.spawnH+settings.extraSpawnH)*40, -- Max Spawning height - settings.spawnH*40, -- Spawning height - settings.lockoutH*40, -- Lock-out height - settings.deathH*40, -- Death height - settings.voidH*40 -- Void height + SET.fieldW*40, -- Field Width + (SET.spawnH+SET.extraSpawnH)*40, -- Max Spawning height + SET.spawnH*40, -- Spawning height + SET.lockoutH*40, -- Lock-out height + SET.deathH*40, -- Death height + SET.voidH*40 -- Void height ) self:triggerEvent('drawInField') -- From frame's bottom-left, 40px a cell @@ -1786,39 +1786,39 @@ function MP:render() skin.drawFieldBorder() -- Asd indicator - skin.drawAsdIndicator(self.moveDir,self.moveCharge,settings.asd,settings.asp,settings.ash) + skin.drawAsdIndicator(self.moveDir,self.moveCharge,SET.asd,SET.asp,SET.ash) -- Delay indicator if not self.hand then -- Spawn - skin.drawDelayIndicator(COLOR.lB,self.spawnTimer/settings.spawnDelay) + skin.drawDelayIndicator(COLOR.lB,self.spawnTimer/SET.spawnDelay) elseif self.deathTimer then -- Death - skin.drawDelayIndicator(COLOR.R,self.deathTimer/settings.deathDelay) + skin.drawDelayIndicator(COLOR.R,self.deathTimer/SET.deathDelay) else -- Lock - skin.drawDelayIndicator(COLOR.lY,self.lockTimer/settings.lockDelay) + skin.drawDelayIndicator(COLOR.lY,self.lockTimer/SET.lockDelay) end -- Garbage buffer skin.drawGarbageBuffer(self.garbageBuffer) -- Lock delay indicator - skin.drawLockDelayIndicator(settings.freshCondition,self.freshChance) + skin.drawLockDelayIndicator(SET.freshCondition,self.freshChance) -- Next (Almost same as drawing hold(s), don't forget to change both) gc_push('transform') gc_translate(200,-400) - skin.drawNextBorder(settings.nextSlot) - for n=1,min(#self.nextQueue,settings.nextSlot) do - skin.drawNext(n,self.nextQueue[n].matrix,settings.holdMode=='swap' and not settings.infHold and n<=self.holdTime) + skin.drawNextBorder(SET.nextSlot) + for n=1,min(#self.nextQueue,SET.nextSlot) do + skin.drawNext(n,self.nextQueue[n].matrix,SET.holdMode=='swap' and not SET.infHold and n<=self.holdTime) end gc_pop() -- Hold (Almost same as drawing next(s), don't forget to change both) gc_push('transform') gc_translate(-200,-400) - skin.drawHoldBorder(settings.holdMode,settings.holdSlot) + skin.drawHoldBorder(SET.holdMode,SET.holdSlot) if #self.holdQueue>0 then for n=1,#self.holdQueue do - skin.drawHold(n,self.holdQueue[n].matrix,settings.holdMode=='hold' and not settings.infHold and n<=self.holdTime) + skin.drawHold(n,self.holdQueue[n].matrix,SET.holdMode=='hold' and not SET.infHold and n<=self.holdTime) end end gc_pop() @@ -1832,8 +1832,8 @@ function MP:render() self:triggerEvent('drawOnPlayer') -- From player's center -- Starting counter - if self.time