Skip to content

Commit

Permalink
添加引导新玩家改键位
Browse files Browse the repository at this point in the history
框架跟进
  • Loading branch information
MrZ626 committed Oct 8, 2023
1 parent cad10db commit 7803324
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 1 files
+15 −3 gcExtend.lua
6 changes: 4 additions & 2 deletions assets/progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local gc=love.graphics
Single>=200 or Sum>=350 → III
]]
local prgs=setmetatable({
firstLaunch=true,
launchCount=0,
main=1,
tutorial='000000',
interiorScore={
Expand All @@ -24,6 +24,8 @@ local prgs=setmetatable({
dig_practice=0,
},
},
puyo_wip=false,
gem_wip=false,
},{
__index=function(_,k)
error("Attempt to read undefined progress data: "..tostring(k))
Expand Down Expand Up @@ -118,7 +120,7 @@ function PROGRESS.load()
-- MSG.new('info',"Hash not match")
-- end
end
prgs.firstLaunch=false
prgs.launchCount=prgs.launchCount+1
else
MSG.new('info',"Load progress failed: "..res)
end
Expand Down
11 changes: 11 additions & 0 deletions assets/scene/main_in.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
local consoleClickCount=0
local settingHint

local scene={}
function scene.enter()
consoleClickCount=0
settingHint=PROGRESS.get('main')<2 and PROGRESS.get('launchCount')<=3
PROGRESS.setEnv('interior')
local visibleButtonName=PROGRESS.get('main')==1 and '1' or '2'
for _,v in next,scene.widgetList do
Expand Down Expand Up @@ -60,6 +62,15 @@ function scene.draw()
GC.scale(2)
GC.print("T",-215,-200)
GC.print("echmino",-165,-200)

-- Notify new player about setting
if settingHint then
GC.replaceTransform(SCR.xOy)
GC.setLineWidth(6)
GC.setColor(.626,1,.626,.26+.1*math.sin(2.6*love.timer.getTime()))
local W=scene.widgetList.GameSet
GC.mRect('line',W._x,W._y,W.w+42,W.h+42)
end
end

scene.widgetList={
Expand Down
25 changes: 20 additions & 5 deletions assets/scene/setting_in.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
local settingHint

local scene={}

function scene.enter()
settingHint=PROGRESS.get('main')<2 and PROGRESS.get('launchCount')<=3

local L=scene.widgetList
if PROGRESS.get('main')==1 then
L.das.y=250
Expand All @@ -26,16 +30,27 @@ function scene.keyDown(key)
end
end

function scene.draw()
-- Notify new player about setting
if settingHint then
GC.replaceTransform(SCR.xOy)
GC.setLineWidth(6)
GC.setColor(.626,1,.626,.26+.1*math.sin(2.6*love.timer.getTime()))
local W=scene.widgetList[MOBILE and 'setTouch' or 'setKey']
GC.mRect('line',W._x,W._y,W.w+42,W.h+42)
end
end

local function sliderShow_time(S) return S.disp().." ms" end

scene.widgetList={
{type='button', pos={0,.5},x=210,y=-360,w=200,h=80,lineWidth=4,cornerR=0,sound_trigger='button_back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn('none')},

{type='button', pos={0,.5},x=290,y=-180,w=360,h=80,lineWidth=4,cornerR=0, fontSize=40,text=LANG'setting_keymapping', code=WIDGET.c_goScn('keyset_in','none')},
{type='checkBox', pos={0,.5},x=130,y=-60, w=40, lineWidth=4,cornerR=0,labelPos='right',fontSize=40,text=LANG'setting_enableTouching', disp=TABLE.func_getVal(SETTINGS.system,'touchControl'),code=TABLE.func_revVal(SETTINGS.system,'touchControl')},
{type='button', pos={0,.5},x=290,y=20, w=360,h=80,lineWidth=4,cornerR=0, fontSize=40,text=LANG'setting_touching', code=WIDGET.c_goScn('keyset_touch_in','none'),visibleTick=TABLE.func_getVal(SETTINGS.system,'touchControl')},
{type='checkBox', pos={0,.5},x=130,y=250, w=40, lineWidth=4,cornerR=0,labelPos='right',fontSize=40,text=LANG'setting_fullscreen', disp=TABLE.func_getVal(SETTINGS.system,'fullscreen'), code=TABLE.func_revVal(SETTINGS.system,'fullscreen')},
{type='checkBox', pos={0,.5},x=130,y=350, w=40, lineWidth=4,cornerR=0,labelPos='right',fontSize=40,text=LANG'setting_autoMute', disp=TABLE.func_getVal(SETTINGS.system,'autoMute'), code=TABLE.func_revVal(SETTINGS.system,'autoMute')},
{type='button', name='setKey',pos={0,.5},x=290,y=-180,w=360,h=80, lineWidth=4,cornerR=0, fontSize=40,text=LANG'setting_keymapping', code=WIDGET.c_goScn('keyset_in','none')},
{type='checkBox', pos={0,.5},x=130,y=-60, w=40, lineWidth=4,cornerR=0,labelPos='right',fontSize=40,text=LANG'setting_enableTouching', disp=TABLE.func_getVal(SETTINGS.system,'touchControl'),code=TABLE.func_revVal(SETTINGS.system,'touchControl')},
{type='button', name='setTouch',pos={0,.5},x=290,y=20, w=360,h=80,lineWidth=4,cornerR=0, fontSize=40,text=LANG'setting_touching', code=WIDGET.c_goScn('keyset_touch_in','none'),visibleTick=TABLE.func_getVal(SETTINGS.system,'touchControl')},
{type='checkBox', pos={0,.5},x=130,y=250, w=40, lineWidth=4,cornerR=0,labelPos='right',fontSize=40,text=LANG'setting_fullscreen', disp=TABLE.func_getVal(SETTINGS.system,'fullscreen'), code=TABLE.func_revVal(SETTINGS.system,'fullscreen')},
{type='checkBox', pos={0,.5},x=130,y=350, w=40, lineWidth=4,cornerR=0,labelPos='right',fontSize=40,text=LANG'setting_autoMute', disp=TABLE.func_getVal(SETTINGS.system,'autoMute'), code=TABLE.func_revVal(SETTINGS.system,'autoMute')},

{type='slider', pos={1,.5},x=-550, y=-370,w=400,fontSize=40,text=LANG'setting_mainVol',widthLimit=260,disp=TABLE.func_getVal(SETTINGS.system,'mainVol'),code=TABLE.func_setVal(SETTINGS.system,'mainVol')},
{type='slider', pos={1,.5},x=-550, y=-290,w=400,fontSize=40,text=LANG'setting_bgm', widthLimit=260,disp=TABLE.func_getVal(SETTINGS.system,'bgmVol'), code=TABLE.func_setVal(SETTINGS.system,'bgmVol')},
Expand Down

0 comments on commit 7803324

Please sign in to comment.