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