mirror of
https://github.com/yuukiwww/taiko-web.git
synced 2024-10-22 17:05:49 +02:00
Hide keyboard tutorial from mobile users
This commit is contained in:
parent
386b8905ac
commit
d36d013551
@ -111,12 +111,16 @@ class SongSelect{
|
||||
action: "random",
|
||||
category: "ランダム"
|
||||
})
|
||||
if(touchEnabled){
|
||||
fromTutorial = false
|
||||
}else{
|
||||
this.songs.push({
|
||||
title: "あそびかた説明",
|
||||
skin: this.songSkin.tutorial,
|
||||
action: "tutorial",
|
||||
category: "ランダム"
|
||||
})
|
||||
}
|
||||
this.songs.push({
|
||||
title: "もどる",
|
||||
skin: this.songSkin.back,
|
||||
@ -143,16 +147,16 @@ class SongSelect{
|
||||
this.selectedDiff = 0
|
||||
assets.sounds["bgm_songsel"].playLoop(0.1, false, 0, 1.442, 3.506)
|
||||
|
||||
if(fromTutorial || !("selectedSong" in localStorage)){
|
||||
this.selectedSong = this.songs.findIndex(song => song.action === "tutorial")
|
||||
this.playBgm(true)
|
||||
}else{
|
||||
if(touchEnabled || !fromTutorial && "selectedSong" in localStorage){
|
||||
if("selectedSong" in localStorage){
|
||||
this.selectedSong = Math.min(Math.max(0, localStorage["selectedSong"] |0), this.songs.length)
|
||||
}
|
||||
assets.sounds["song-select"].play()
|
||||
snd.musicGain.fadeOut()
|
||||
this.playBgm(false)
|
||||
}else{
|
||||
this.selectedSong = this.songs.findIndex(song => song.action === "tutorial")
|
||||
this.playBgm(true)
|
||||
}
|
||||
if("selectedDiff" in localStorage){
|
||||
this.selectedDiff = Math.min(Math.max(0, localStorage["selectedDiff"] |0), 4)
|
||||
@ -324,6 +328,9 @@ class SongSelect{
|
||||
}
|
||||
}
|
||||
pointer(enabled){
|
||||
if(!this.canvas){
|
||||
return
|
||||
}
|
||||
if(enabled && this.state.hasPointer === false){
|
||||
this.canvas.style.cursor = "pointer"
|
||||
this.state.hasPointer = true
|
||||
|
@ -26,10 +26,10 @@ class Titlescreen{
|
||||
setTimeout(this.goNext.bind(this), 500)
|
||||
}
|
||||
goNext(){
|
||||
if(localStorage.getItem("tutorial") !== "true"){
|
||||
new Tutorial()
|
||||
}else{
|
||||
if(this.touched || localStorage.getItem("tutorial") === "true"){
|
||||
new SongSelect(false, false, this.touched)
|
||||
}else{
|
||||
new Tutorial()
|
||||
}
|
||||
}
|
||||
clean(){
|
||||
|
Loading…
Reference in New Issue
Block a user