From ac7698405225785236e2d9131659fe16e79f9a16 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 25 Nov 2020 14:25:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=B9=E5=9D=97=E6=BA=85?= =?UTF-8?q?=E5=B0=84=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/sysFX.lua | 42 +++++++++++++++++++++++----------- parts/globalTables.lua | 3 ++- parts/language/lang_en.lua | 1 + parts/language/lang_fr.lua | 1 + parts/language/lang_sp.lua | 1 + parts/language/lang_symbol.lua | 1 + parts/language/lang_yygq.lua | 1 + parts/language/lang_zh.lua | 10 +------- parts/player/gameEnv0.lua | 4 +++- parts/player/init.lua | 2 ++ parts/player/player.lua | 15 +++++++++++- parts/scenes/setting_video.lua | 15 ++++++------ 12 files changed, 64 insertions(+), 32 deletions(-) diff --git a/Zframework/sysFX.lua b/Zframework/sysFX.lua index dbe8bb0a..d0e0285d 100644 --- a/Zframework/sysFX.lua +++ b/Zframework/sysFX.lua @@ -1,10 +1,17 @@ local gc=love.graphics local setColor,setWidth=gc.setColor,gc.setLineWidth local max,min=math.max,math.min +local sin,cos=math.sin,math.cos +local rnd=math.random local rem=table.remove local fx={} +local function normUpdate(S,dt) + S.t=S.t+dt*S.rate + return S.t>1 +end + local FXupdate={} function FXupdate.badge(S,dt) S.t=S.t+dt @@ -19,22 +26,16 @@ function FXupdate.badge(S,dt) end return S.t>=1 end -function FXupdate.attack(S,dt) +FXupdate.attack=normUpdate +FXupdate.ripple=normUpdate +FXupdate.rectRipple=normUpdate +FXupdate.shade=normUpdate +function FXupdate.cell(S,dt) + S.x=S.x+S.vx + S.y=S.y+S.vy S.t=S.t+dt*S.rate return S.t>1 end -function FXupdate.ripple(S,dt) - S.t=S.t+dt*S.rate - return S.t>=1 -end -function FXupdate.rectRipple(S,dt) - S.t=S.t+dt*S.rate - return S.t>=1 -end -function FXupdate.shade(S,dt) - S.t=S.t+dt*S.rate - return S.t>=1 -end local FXdraw={} function FXdraw.badge(S) @@ -78,6 +79,10 @@ function FXdraw.shade(S) setColor(S.r,S.g,S.b,1-S.t) gc.rectangle("fill",S.x,S.y,S.w,S.h,2) end +function FXdraw.cell(S,dt) + setColor(1,1,1,1-S.t) + gc.draw(S.image,S.x,S.y,nil,S.size) +end local SYSFX={} function SYSFX.update(dt) @@ -143,4 +148,15 @@ function SYSFX.newShade(rate,r,g,b,x,y,w,h) x=x,y=y,w=w,h=h, } end +function SYSFX.newCell(rate,image,x,y,size) + local v,a=1+rnd(),rnd()*6.28 + fx[#fx+1]={ + update=FXupdate.cell, + draw=FXdraw.cell, + t=0, + rate=rate,image=image, + x=x,y=y,size=size, + vx=v*cos(a),vy=v*sin(a), + } +end return SYSFX \ No newline at end of file diff --git a/parts/globalTables.lua b/parts/globalTables.lua index 06c66149..1f35a409 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -247,8 +247,9 @@ SETTING={ dropFX=2, moveFX=2, clearFX=2, + splashFX=2, shakeFX=2, - atkFX=3, + atkFX=2, frameMul=100, text=true, diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index 8fb29e1b..1868a67a 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -242,6 +242,7 @@ return{ dropFX="Drop FX Level", moveFX="Move FX Level", clearFX="Clear FX Level", + splashFX="Splash FX Level", shakeFX="Field Sway Level", atkFX="Atk. FX Level", frame="Render Frame Rate", diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 5ec003b4..84d15414 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -247,6 +247,7 @@ return{ dropFX="Effets de chute", moveFX="Effets de déplacement", clearFX="Effets de nettoyage", + -- splashFX="Splash FX Level", shakeFX="Tremblements de l'écran", atkFX="Effets d'attaque", frame="Montrer les FPS", diff --git a/parts/language/lang_sp.lua b/parts/language/lang_sp.lua index 99988ab5..f763877d 100644 --- a/parts/language/lang_sp.lua +++ b/parts/language/lang_sp.lua @@ -248,6 +248,7 @@ return{ dropFX="FX Vis. de Caída", moveFX="FX Vis. de Movim.", clearFX="FX Vis. de Limpieza", + -- splashFX="Splash FX Level", shakeFX="Bamboleo del Tablero", atkFX="FX Vis. de Ataque", frame="Ratio de FPSs", diff --git a/parts/language/lang_symbol.lua b/parts/language/lang_symbol.lua index cb907988..4da03390 100644 --- a/parts/language/lang_symbol.lua +++ b/parts/language/lang_symbol.lua @@ -178,6 +178,7 @@ return{ dropFX="↓~", moveFX="←→~", clearFX="↓↓↓~", + splashFX="↑↑↑~", shakeFX="~|~|~", atkFX="→→~", frame="|=|", diff --git a/parts/language/lang_yygq.lua b/parts/language/lang_yygq.lua index 3aca2e0c..654bc45e 100644 --- a/parts/language/lang_yygq.lua +++ b/parts/language/lang_yygq.lua @@ -78,6 +78,7 @@ return{ dropFX="下落特效", moveFX="移动特效", clearFX="消除特效", + splashFX="溅射特效", shakeFX="晃动特效", atkFX="攻击特效", diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index 8f4ab440..f99a1629 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -265,14 +265,6 @@ return{ grid="网格", bagLine="包分界线", - lockFX="锁定特效等级", - dropFX="下落特效等级", - moveFX="移动特效等级", - clearFX="消除特效等级", - shakeFX="晃动特效等级", - atkFX="攻击特效等级", - frame="绘制帧率", - text="消行文本", score="分数动画", warn="死亡预警", @@ -748,7 +740,6 @@ return{ "感觉自己速度到上限了?试着把das调低一点", "感谢群友帮忙想tips", "刚开始练全隐形可以尽量堆平,留一列消四", - "给别人推荐本游戏的时候请记住我真的不叫铁壳米诺!!!", "更小的DAS和ARR拥有更高的操作上限(能控制得了的话)", "更新内容在游戏里和群公告都有写!", "还能写些什么tip呢", @@ -837,6 +828,7 @@ return{ "Nullpomino也很好玩!", "Phigros好玩!", "STSD必死", + "Techmino n.铁壳米诺(游戏名)", "Techmino安卓下载", "Techmino好玩!", "Techmino没有抽卡没有氪金,太好玩了", diff --git a/parts/player/gameEnv0.lua b/parts/player/gameEnv0.lua index 3eca518e..87585a52 100644 --- a/parts/player/gameEnv0.lua +++ b/parts/player/gameEnv0.lua @@ -17,7 +17,9 @@ return{ dropFX=2, moveFX=2, clearFX=2, - shakeFX=3, + splashFX=2, + shakeFX=2, + atkFX=2, highCam=false, nextPos=false, diff --git a/parts/player/init.lua b/parts/player/init.lua index 3a91bd9a..2436392d 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -283,12 +283,14 @@ local function applyGameEnv(P)--Finish gameEnv processing ENV.dropFX=nil ENV.moveFX=nil ENV.clearFX=nil + ENV.splashFX=nil ENV.shakeFX=nil else if ENV.lockFX==0 then ENV.lockFX=nil end if ENV.dropFX==0 then ENV.dropFX=nil end if ENV.moveFX==0 then ENV.moveFX=nil end if ENV.clearFX==0 then ENV.clearFX=nil end + if ENV.splashFX==0 then ENV.splashFX=nil end if ENV.shakeFX==0 then ENV.shakeFX=nil end end if ENV.ghost==0 then ENV.ghost=nil end diff --git a/parts/player/player.lua b/parts/player/player.lua index 12552409..f4e15f4c 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -80,6 +80,15 @@ function Player.createMoveFX(P,dir) end end end end +function Player.createSplashFX(P,y) + local L=P.field[y] + for x=1,10 do + local c=L[x] + if c>0 then + SYSFX.newCell(6-P.gameEnv.splashFX,SKIN.curText[c],P.fieldX+30*x-30,P.fieldY+600-30*y,1) + end + end +end function Player.createClearingFX(P,y,spd) ins(P.clearFX,{y,0,spd}) end @@ -849,7 +858,11 @@ do--Player.drop(P)--Place piece if cc>0 and ENV.clearFX then local t=7-ENV.clearFX*1 for i=1,cc do - P:createClearingFX(P.clearedRow[i],t) + local y=P.clearedRow[i] + P:createClearingFX(y,t) + if ENV.splashFX then + P:createSplashFX(y) + end end end diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index e25a127b..de79a015 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -6,7 +6,7 @@ function sceneBack.setting_video() end WIDGET.init("setting_video",{ - WIDGET.newText{name="title", x=640,y=15,font=80}, + WIDGET.newText{name="title", x=640, y=15,font=80}, WIDGET.newButton{name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=WIDGET.lnk_swapScene("setting_sound","swipeR")}, WIDGET.newButton{name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=WIDGET.lnk_swapScene("setting_game","swipeL")}, @@ -19,13 +19,14 @@ WIDGET.init("setting_video",{ WIDGET.newSwitch{name="grid", x=700, y=240, disp=WIDGET.lnk_SETval("grid"), code=WIDGET.lnk_SETrev("grid")}, WIDGET.newSwitch{name="bagLine", x=700, y=300, disp=WIDGET.lnk_SETval("bagLine"), code=WIDGET.lnk_SETrev("bagLine")}, - WIDGET.newSlider{name="lockFX", x=350, y=350,w=373,unit=5, disp=WIDGET.lnk_SETval("lockFX"), code=WIDGET.lnk_SETsto("lockFX")}, - WIDGET.newSlider{name="dropFX", x=350, y=400,w=373,unit=5, disp=WIDGET.lnk_SETval("dropFX"), code=WIDGET.lnk_SETsto("dropFX")}, - WIDGET.newSlider{name="moveFX", x=350, y=450,w=373,unit=5, disp=WIDGET.lnk_SETval("moveFX"), code=WIDGET.lnk_SETsto("moveFX")}, + WIDGET.newSlider{name="lockFX", x=350, y=365,w=373,unit=5, disp=WIDGET.lnk_SETval("lockFX"), code=WIDGET.lnk_SETsto("lockFX")}, + WIDGET.newSlider{name="dropFX", x=350, y=410,w=373,unit=5, disp=WIDGET.lnk_SETval("dropFX"), code=WIDGET.lnk_SETsto("dropFX")}, + WIDGET.newSlider{name="moveFX", x=350, y=455,w=373,unit=5, disp=WIDGET.lnk_SETval("moveFX"), code=WIDGET.lnk_SETsto("moveFX")}, WIDGET.newSlider{name="clearFX", x=350, y=500,w=373,unit=5, disp=WIDGET.lnk_SETval("clearFX"), code=WIDGET.lnk_SETsto("clearFX")}, - WIDGET.newSlider{name="shakeFX", x=350, y=550,w=373,unit=5, disp=WIDGET.lnk_SETval("shakeFX"), code=WIDGET.lnk_SETsto("shakeFX")}, - WIDGET.newSlider{name="atkFX", x=350, y=600,w=373,unit=5, disp=WIDGET.lnk_SETval("atkFX"), code=WIDGET.lnk_SETsto("atkFX")}, - WIDGET.newSlider{name="frame", x=350, y=650,w=373,unit=10, + WIDGET.newSlider{name="splashFX", x=350, y=545,w=373,unit=5, disp=WIDGET.lnk_SETval("splashFX"), code=WIDGET.lnk_SETsto("splashFX")}, + WIDGET.newSlider{name="shakeFX", x=350, y=590,w=373,unit=5, disp=WIDGET.lnk_SETval("shakeFX"), code=WIDGET.lnk_SETsto("shakeFX")}, + WIDGET.newSlider{name="atkFX", x=350, y=635,w=373,unit=5, disp=WIDGET.lnk_SETval("atkFX"), code=WIDGET.lnk_SETsto("atkFX")}, + WIDGET.newSlider{name="frame", x=350, y=680,w=373,unit=10, disp=function() return SETTING.frameMul>35 and SETTING.frameMul/10 or SETTING.frameMul/5-4 end,