more audio updates
This commit is contained in:
parent
5eac1c3f14
commit
90e461b587
@ -37,7 +37,15 @@ var assets = {
|
|||||||
'combo-500.wav',
|
'combo-500.wav',
|
||||||
'combo-600.wav',
|
'combo-600.wav',
|
||||||
'combo-700.wav',
|
'combo-700.wav',
|
||||||
'song-select.wav'
|
'song-select.wav',
|
||||||
|
'title.ogg',
|
||||||
|
'pause.wav',
|
||||||
|
'cancel.wav',
|
||||||
|
'results.wav',
|
||||||
|
|
||||||
|
|
||||||
|
'bgm_songsel.mp3',
|
||||||
|
'bgm_results.ogg'
|
||||||
),
|
),
|
||||||
|
|
||||||
songs: new Array(),
|
songs: new Array(),
|
||||||
|
@ -249,12 +249,14 @@ function Game(controller, selectedSong, songData){
|
|||||||
|
|
||||||
this.togglePause = function(){
|
this.togglePause = function(){
|
||||||
if(!_paused){
|
if(!_paused){
|
||||||
|
assets.sounds["pause"].play();
|
||||||
_paused=true;
|
_paused=true;
|
||||||
_latestDate = new Date();
|
_latestDate = new Date();
|
||||||
_this.toggleMainMusic();
|
_this.toggleMainMusic();
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
assets.sounds["cancel"].play();
|
||||||
_paused=false;
|
_paused=false;
|
||||||
var currentDate = new Date();
|
var currentDate = new Date();
|
||||||
_ellapsedTimeSincePause = _ellapsedTimeSincePause + Math.abs(currentDate.getTime() - _latestDate.getTime());
|
_ellapsedTimeSincePause = _ellapsedTimeSincePause + Math.abs(currentDate.getTime() - _latestDate.getTime());
|
||||||
|
@ -10,6 +10,9 @@ function loadSong(selectedSong){
|
|||||||
|
|
||||||
this.run = function(){
|
this.run = function(){
|
||||||
|
|
||||||
|
assets.sounds["bgm_songsel"].pause();
|
||||||
|
assets.sounds["bgm_songsel"].currentTime = 0;
|
||||||
|
|
||||||
assets.sounds["start"].play();
|
assets.sounds["start"].play();
|
||||||
$("#assets").append("<img id='music-bg' src='/songs/"+_selectedSong.folder+"/bg.png' />");
|
$("#assets").append("<img id='music-bg' src='/songs/"+_selectedSong.folder+"/bg.png' />");
|
||||||
|
|
||||||
|
@ -71,15 +71,23 @@ function Scoresheet(controller, score){
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.run = function(){
|
this.run = function(){
|
||||||
|
assets.sounds["results"].play();
|
||||||
|
|
||||||
|
assets.sounds["bgm_results"].volume = 1;
|
||||||
|
assets.sounds["bgm_results"].play();
|
||||||
|
|
||||||
_this.positionning();
|
_this.positionning();
|
||||||
_this.setResults();
|
_this.setResults();
|
||||||
|
|
||||||
$("#song-select").click(function(){
|
$("#song-select").click(function(){
|
||||||
|
assets.sounds["bgm_results"].pause();
|
||||||
|
assets.sounds["bgm_songsel"].currentTime = 0;
|
||||||
controller.songSelection();
|
controller.songSelection();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#replay").click(function(){
|
$("#replay").click(function(){
|
||||||
|
assets.sounds["bgm_results"].pause();
|
||||||
|
assets.sounds["bgm_songsel"].currentTime = 0;
|
||||||
controller.restartSong();
|
controller.restartSong();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ function SongSelect(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.createCode = function(){
|
this.createCode = function(){
|
||||||
|
|
||||||
|
assets.sounds["bgm_songsel"].play();
|
||||||
assets.sounds["song-select"].play();
|
assets.sounds["song-select"].play();
|
||||||
for(var i=0; i<assets.songs.length; i++){
|
for(var i=0; i<assets.songs.length; i++){
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ function Titlescreen(){
|
|||||||
$("#screen").find("#title-screen").show();
|
$("#screen").find("#title-screen").show();
|
||||||
$(window).resize(_this.positionning);
|
$(window).resize(_this.positionning);
|
||||||
|
|
||||||
|
assets.sounds["title"].play();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.goNext = function(){
|
this.goNext = function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user