From c072d09a93e57faf4314e18fe94e0c65f447cf35 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Fri, 12 Jul 2024 10:18:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=A4=A7=E5=A4=9A=E6=95=B0=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E5=8A=A0=E4=B8=8A=E9=BC=A0=E6=A0=87=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/scene/about_out.lua | 30 +++++++++++++++++------------- assets/scene/keyset_in.lua | 1 + assets/scene/keyset_out.lua | 1 + assets/scene/keyset_press.lua | 1 + assets/scene/keyset_touch_in.lua | 2 +- assets/scene/lang_in.lua | 1 + assets/scene/lang_out.lua | 1 + assets/scene/main_in.lua | 1 + assets/scene/main_out.lua | 5 ++--- assets/scene/mode_exterior.lua | 1 + assets/scene/musicroom.lua | 2 +- assets/scene/result_in.lua | 1 + assets/scene/result_out.lua | 1 + assets/scene/setting_in.lua | 1 + assets/scene/setting_out.lua | 2 ++ assets/scene/simulation.lua | 2 ++ assets/scene/tutorial_in.lua | 1 + 17 files changed, 36 insertions(+), 18 deletions(-) diff --git a/assets/scene/about_out.lua b/assets/scene/about_out.lua index 26ee22fa..86da4d90 100644 --- a/assets/scene/about_out.lua +++ b/assets/scene/about_out.lua @@ -37,21 +37,25 @@ function scene.load() timer,score=12.6,0 end -function scene.mouseDown(x,y) - x,y=SCR.xOy:transformPoint(x,y) - x,y=SCR.xOy_d:inverseTransformPoint(x,y) - for i=1,#obj do - local o=obj[i] - if math.abs(x-o.x)<=o.r and math.abs(y+o.y)<=o.r then - if not o.name then - setName(o) +function scene.mouseDown(x,y,k) + if k==1 then + x,y=SCR.xOy:transformPoint(x,y) + x,y=SCR.xOy_d:inverseTransformPoint(x,y) + for i=1,#obj do + local o=obj[i] + if math.abs(x-o.x)<=o.r and math.abs(y+o.y)<=o.r then + if not o.name then + setName(o) + end + o.vx=(o.vx+(o.x-x)*6.26)*.626 + o.vy=math.min((o.vy+math.random(620,1260))*.8,600) + o.va=o.va+(o.x-x)/26*(.8+.4*math.random()) + score=score+o.score+(60-o.r/1.62)+math.random(2,6) + break end - o.vx=(o.vx+(o.x-x)*6.26)*.626 - o.vy=math.min((o.vy+math.random(620,1260))*.8,600) - o.va=o.va+(o.x-x)/26*(.8+.4*math.random()) - score=score+o.score+(60-o.r/1.62)+math.random(2,6) - break end + elseif k==2 then + SCN.back('fadeHeader') end end diff --git a/assets/scene/keyset_in.lua b/assets/scene/keyset_in.lua index 4f6cd4d0..1dc198fe 100644 --- a/assets/scene/keyset_in.lua +++ b/assets/scene/keyset_in.lua @@ -35,6 +35,7 @@ function scene.unload() saveKey() end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('none') end end function scene.keyDown(key,isRep) if isRep then return true end if KEYMAP.sys:getAction(key)=='back' then diff --git a/assets/scene/keyset_out.lua b/assets/scene/keyset_out.lua index 947777ec..a2f136c1 100644 --- a/assets/scene/keyset_out.lua +++ b/assets/scene/keyset_out.lua @@ -33,6 +33,7 @@ function scene.unload() saveKey() end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('fadeHeader') end end function scene.keyDown(key,isRep) if isRep then return true end if key=='`' and isAltPressed then diff --git a/assets/scene/keyset_press.lua b/assets/scene/keyset_press.lua index 45b80578..fb4806af 100644 --- a/assets/scene/keyset_press.lua +++ b/assets/scene/keyset_press.lua @@ -17,6 +17,7 @@ function scene.load() if SETTINGS.system.touchControl then resetVirtualKeyMode(mode) end end +function scene.mouseDown(_,_,k) if k==2 then escTimerWTF=.26 end end function scene.keyDown(key,isRep) if isRep then return true end if result then return true end diff --git a/assets/scene/keyset_touch_in.lua b/assets/scene/keyset_touch_in.lua index d51702d1..fb373b7e 100644 --- a/assets/scene/keyset_touch_in.lua +++ b/assets/scene/keyset_touch_in.lua @@ -41,7 +41,7 @@ end function scene.touchMove(_,_,dx,dy,id) VCTRL.drag(dx,dy,id) end function scene.touchUp(_,_,id) VCTRL.release(id) end -function scene.mouseDown(x,y,k) if k==1 then scene.touchDown(x,y,1) end end +function scene.mouseDown(x,y,k) if k==1 then scene.touchDown(x,y,1) elseif k==2 then SCN.back(SCN.cur=='keyset_touch_in' and 'none' or nil) end end function scene.mouseMove(x,y,dx,dy) scene.touchMove(x,y,dx,dy,1) end function scene.mouseUp(x,y,k) if k==1 then scene.touchUp(x,y,1) end end diff --git a/assets/scene/lang_in.lua b/assets/scene/lang_in.lua index 1610d988..cd65a634 100644 --- a/assets/scene/lang_in.lua +++ b/assets/scene/lang_in.lua @@ -30,6 +30,7 @@ function scene.unload() end end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('none') end end function scene.keyDown(key) if KEYMAP.sys:getAction(key)=='back' then SCN.back('none') diff --git a/assets/scene/lang_out.lua b/assets/scene/lang_out.lua index 7cb6c62e..64aba91f 100644 --- a/assets/scene/lang_out.lua +++ b/assets/scene/lang_out.lua @@ -30,6 +30,7 @@ function scene.unload() end end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('fadeHeader') end end function scene.keyDown(key) if KEYMAP.sys:getAction(key)=='back' then SCN.back() diff --git a/assets/scene/main_in.lua b/assets/scene/main_in.lua index 1f6a689e..c1761b27 100644 --- a/assets/scene/main_in.lua +++ b/assets/scene/main_in.lua @@ -31,6 +31,7 @@ local function sysAction(action) end end end +function scene.mouseDown(_,_,k) if k==2 then sysAction('back') end end function scene.keyDown(key,isRep) if isRep then return true end sysAction(KEYMAP.sys:getAction(key)) diff --git a/assets/scene/main_out.lua b/assets/scene/main_out.lua index 1ad39e2f..4c00607e 100644 --- a/assets/scene/main_out.lua +++ b/assets/scene/main_out.lua @@ -4,12 +4,11 @@ local scene={} local textOffset=6 local versionText=GC.newText(FONT.get(35,'bold')) local terminalName=GC.newText(FONT.get(35)) +versionText:set(VERSION.appVer) +terminalName:set(("TERM[%s]"):format(SYSTEM:sub(1,3):upper())) function scene.load() - if MATH.roll(.026) then textOffset=26 end PROGRESS.applyEnv('exterior') - versionText:set(VERSION.appVer) - terminalName:set(("TERM[%s]"):format(SYSTEM:sub(1,3):upper())) end local function sysAction(action) diff --git a/assets/scene/mode_exterior.lua b/assets/scene/mode_exterior.lua index 8c0967e5..24af73b5 100644 --- a/assets/scene/mode_exterior.lua +++ b/assets/scene/mode_exterior.lua @@ -124,6 +124,7 @@ local function sysAction(action) SCN.back('fadeHeader') end end +function scene.mouseDown(_,_,k) if k==2 then sysAction('back') end end function scene.keyDown(key,isRep) if isRep then return true end if key=='f6' then exMap:_printModePos() return true end diff --git a/assets/scene/musicroom.lua b/assets/scene/musicroom.lua index ad2358fe..b90e4f8b 100644 --- a/assets/scene/musicroom.lua +++ b/assets/scene/musicroom.lua @@ -183,7 +183,7 @@ function scene.keyDown(key,isRep) return true end function scene.mouseMove() scene.focus(true) end -function scene.mouseDown() scene.focus(true) end +function scene.mouseDown(_,_,k) scene.focus(true) if k==2 then SCN.back('fadeHeader') end end function scene.wheelMove() scene.focus(true) end function scene.touchDown() scene.focus(true) end function scene.focus(f) -- Reduce carbon footprint for music lovers diff --git a/assets/scene/result_in.lua b/assets/scene/result_in.lua index 242e2cf4..197cee32 100644 --- a/assets/scene/result_in.lua +++ b/assets/scene/result_in.lua @@ -7,6 +7,7 @@ function scene.load() time=0 end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('none') end end function scene.keyDown(key) local action=KEYMAP.sys:getAction(key) if action=='restart' then diff --git a/assets/scene/result_out.lua b/assets/scene/result_out.lua index 202cd968..697d2511 100644 --- a/assets/scene/result_out.lua +++ b/assets/scene/result_out.lua @@ -7,6 +7,7 @@ function scene.load() time=0 end +function scene.mouseDown(_,_,k) if k==2 then SCN.back() end end function scene.keyDown(key) local action=KEYMAP.sys:getAction(key) if action=='restart' then diff --git a/assets/scene/setting_in.lua b/assets/scene/setting_in.lua index aa66a97f..3452168d 100644 --- a/assets/scene/setting_in.lua +++ b/assets/scene/setting_in.lua @@ -10,6 +10,7 @@ function scene.unload() saveSettings() end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('none') end end function scene.keyDown(key) if KEYMAP.sys:getAction(key)=='back' then SCN.back('none') diff --git a/assets/scene/setting_out.lua b/assets/scene/setting_out.lua index 37f60a2f..27d4de5e 100644 --- a/assets/scene/setting_out.lua +++ b/assets/scene/setting_out.lua @@ -30,6 +30,8 @@ function scene.unload() saveSettings() end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('fadeHeader') end end + function scene.keyDown(key,isRep) if isRep then return true end local act=KEYMAP.sys:getAction(key) diff --git a/assets/scene/simulation.lua b/assets/scene/simulation.lua index f055b8cf..6a620d55 100644 --- a/assets/scene/simulation.lua +++ b/assets/scene/simulation.lua @@ -106,6 +106,8 @@ function scene.mouseDown(x,y,k) subjectFocused=s end end + elseif k==2 then + SCN.back('fadeHeader') end end diff --git a/assets/scene/tutorial_in.lua b/assets/scene/tutorial_in.lua index 7574cfed..782a5905 100644 --- a/assets/scene/tutorial_in.lua +++ b/assets/scene/tutorial_in.lua @@ -40,6 +40,7 @@ function scene.load() PROGRESS.applyInteriorBGM() end +function scene.mouseDown(_,_,k) if k==2 then SCN.back('none') end end function scene.keyDown(key) if KEYMAP.sys:getAction(key)=='back' then SCN.back('none')