This commit is contained in:
Bui 2018-08-06 15:12:08 +01:00
parent ebedcd7760
commit f69b0fe38a
2 changed files with 30 additions and 3 deletions

View File

@ -25,6 +25,8 @@ function SongSelect(){
_selectedSong.title = $(this).parent().closest('.song').find('.song-title').html();
_selectedSong.folder = songID+" "+_selectedSong.title;
assets.sounds["diffsel"].pause();
assets.sounds["diffsel"].currentTime = 0;
new loadSong(_selectedSong);
});
@ -38,11 +40,31 @@ function SongSelect(){
$(this).css("background", "rgba(255, 220, 47, 0.90)");
});
$(".song:not(.opened)").click(function(e){
$(".song").click(function(e){
if (!$(e.target).parents('.difficulties').length) {
if ($(".opened").length && $(".opened").attr('id') == $(this).attr('id')) {
assets.sounds["cancel"].play();
$(".difficulty").hide();
$(".opened").removeClass("opened", 300);
assets.sounds["diffsel"].pause();
assets.sounds["diffsel"].currentTime = 0;
setTimeout(function(){
assets.sounds["song-select"].play();
}, 300);
$('.songsel-title').fadeOut(200, function(){
$('.songsel-title').attr('alt', '曲をえらぶ').html('曲をえらぶ').css('left', -300);
$('.songsel-title').animate({left:0, opacity:"show"}, 400);
});
return;
}
assets.sounds["ka"].play();
if(!$('.opened').length) {
assets.sounds["song-select"].pause();
assets.sounds["song-select"].currentTime = 0;
setTimeout(function(){
assets.sounds["diffsel"].play();
}, 300);
@ -67,7 +89,9 @@ function SongSelect(){
this.createCode = function(){
assets.sounds["bgm_songsel"].play();
assets.sounds["song-select"].play();
setTimeout(function(){
assets.sounds["song-select"].play();
}, 200);
for(var i=0; i<assets.songs.length; i++){
var songDir = assets.songs[i].songDir;

View File

@ -37,6 +37,9 @@ function Titlescreen(){
}
this.goNext = function(){
assets.sounds["title"].pause();
assets.sounds["title"].currentTime = 0;
assets.sounds["don"].play();
new SongSelect();
}