mirror of
https://github.com/IllusionMan1212/adventures-of-kuroneko.git
synced 2026-10-24 02:12:36 +00:00
Finalized
This commit is contained in:
@@ -30,6 +30,9 @@ MyGame = ig.Game.extend({
|
||||
boss: null,
|
||||
score: 0,
|
||||
checkpoint: null,
|
||||
titlemusic: new ig.Sound('media/sounds/titlemusic.ogg'),
|
||||
gamemusic: new ig.Sound('media/sounds/gamemusic.ogg'),
|
||||
endmusic: new ig.Sound('media/sounds/gameend.ogg'),
|
||||
|
||||
|
||||
init: function() {
|
||||
@@ -42,6 +45,19 @@ MyGame = ig.Game.extend({
|
||||
|
||||
this.timer = new ig.Timer(5);
|
||||
this.cheesetimer = new ig.Timer(15);
|
||||
|
||||
if (this.currentLevel == LevelTitle) {
|
||||
this.titlemusic.play();
|
||||
}
|
||||
|
||||
if (this.currentLevel == LevelLevel1 || this.currentLevel == LevelLevel2) {
|
||||
this.titlemusic.stop();
|
||||
this.gamemusic.play();
|
||||
}
|
||||
|
||||
if (this.currentLevel == LevelBadend || this.currentLevel == LevelGoodend) {
|
||||
this.endmusic.play();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -57,6 +73,7 @@ MyGame = ig.Game.extend({
|
||||
|
||||
if (this.currentLevel == LevelTitle) {
|
||||
//play title music
|
||||
//this.titlemusic.play();
|
||||
if (ig.input.pressed('space')) {
|
||||
this.loadLevel( LevelLevel1 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user