修复音乐室暂停就爆炸
This commit is contained in:
@@ -45,7 +45,6 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
elseif not isRep then
|
elseif not isRep then
|
||||||
if key=='return'or key=='space'then
|
if key=='return'or key=='space'then
|
||||||
playing=BGM.getPlaying()[1]
|
|
||||||
if playing~=bgmList[S]then
|
if playing~=bgmList[S]then
|
||||||
BGM.play(bgmList[S])
|
BGM.play(bgmList[S])
|
||||||
SFX.play('click')
|
SFX.play('click')
|
||||||
@@ -53,6 +52,7 @@ function scene.keyDown(key,isRep)
|
|||||||
BGM.stop()
|
BGM.stop()
|
||||||
SFX.play('click')
|
SFX.play('click')
|
||||||
end
|
end
|
||||||
|
playing=BGM.getPlaying()[1]
|
||||||
elseif key=='tab'then
|
elseif key=='tab'then
|
||||||
SCN.swapTo('launchpad','none')
|
SCN.swapTo('launchpad','none')
|
||||||
elseif key=='escape'then
|
elseif key=='escape'then
|
||||||
@@ -106,7 +106,8 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Music player
|
--Music player
|
||||||
if playing then
|
print(playing)
|
||||||
|
if BGM.isPlaying() and playing then
|
||||||
setFont(45)
|
setFont(45)
|
||||||
GC.shadedPrint(playing,710,508,'left',2)
|
GC.shadedPrint(playing,710,508,'left',2)
|
||||||
GC.setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
|
GC.setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
|
||||||
@@ -131,7 +132,7 @@ scene.widgetList={
|
|||||||
disp=function()return BGM.tell()/BGM.getDuration()%1 end,
|
disp=function()return BGM.tell()/BGM.getDuration()%1 end,
|
||||||
show=false,
|
show=false,
|
||||||
code=function(v)BGM.set('all','seek',v*BGM.getDuration())end,
|
code=function(v)BGM.set('all','seek',v*BGM.getDuration())end,
|
||||||
hideF=function()return not playing end
|
hideF=function()return not BGM.isPlaying()end
|
||||||
},
|
},
|
||||||
WIDGET.newSlider{name='bgm', x=760,y=80,w=400,disp=SETval('bgm'),code=function(v)SETTING.bgm=v BGM.setVol(SETTING.bgm)end},
|
WIDGET.newSlider{name='bgm', x=760,y=80,w=400,disp=SETval('bgm'),code=function(v)SETTING.bgm=v BGM.setVol(SETTING.bgm)end},
|
||||||
WIDGET.newButton{name='up', x=200,y=250,w=120,sound=false,code=pressKey'up',hideF=function()return selected==1 end,font=60,fText=CHAR.key.up},
|
WIDGET.newButton{name='up', x=200,y=250,w=120,sound=false,code=pressKey'up',hideF=function()return selected==1 end,font=60,fText=CHAR.key.up},
|
||||||
|
|||||||
Reference in New Issue
Block a user