add tutorial screen

This commit is contained in:
Bui
2018-09-02 17:11:09 +01:00
parent a95f2e4319
commit 2405345291
8 changed files with 147 additions and 3 deletions

21
public/src/js/tutorial.js Normal file
View File

@@ -0,0 +1,21 @@
function Tutorial() {
var _this = this;
this.run = function() {
bgm = new BufferedLoop(
{url: '/assets/audio/bgm_setsume.ogg', duration: 1.054},
{url: '/assets/audio/bgm_setsume_loop.ogg', duration: 15}
);
bgm.play();
$('#tutorial-end-button').click(function(){
bgm.pause();
assets.sounds['don'].playAsset();
localStorage.setItem('tutorial', 'true');
new SongSelect();
});
};
$('#screen').load('/src/views/tutorial.html', _this.run);
};