Buffer every sound asset

This commit is contained in:
LoveEevee
2018-09-11 01:17:13 +03:00
parent 66b0924252
commit 0feb31227a
17 changed files with 510 additions and 506 deletions

View File

@@ -67,7 +67,7 @@ function Keyboard(controller){
this.checkMenuKeys = function(){
_gamepad.play(1)
_this.checkKey(_kbd["back"], "menu", function(){
controller.pauseSound("main-music", true);
controller.togglePause();
controller.songSelection();
})
_this.checkKey(_kbd["pause"], "menu", function(){
@@ -84,7 +84,7 @@ function Keyboard(controller){
this.checkKeySound = function(keyCode, sound){
_this.checkKey(keyCode, "sound", function(){
controller.playSound("note_"+sound);
assets.sounds["note_"+sound].play()
_keyTime[sound] = controller.getEllapsedTime().ms
})
}