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:
@@ -21,6 +21,7 @@ ig.module(
|
|||||||
is_dead: false,
|
is_dead: false,
|
||||||
flip: false,
|
flip: false,
|
||||||
kuro: true,
|
kuro: true,
|
||||||
|
death: new ig.Sound('media/sounds/cat-dead.*'),
|
||||||
|
|
||||||
animSheet: new ig.AnimationSheet('media/kuroneko.png', 32, 32),
|
animSheet: new ig.AnimationSheet('media/kuroneko.png', 32, 32),
|
||||||
jumpSheet: new ig.AnimationSheet('media/kuroneko-jump.png', 46, 32),
|
jumpSheet: new ig.AnimationSheet('media/kuroneko-jump.png', 46, 32),
|
||||||
@@ -122,6 +123,7 @@ ig.module(
|
|||||||
|
|
||||||
kill: function() {
|
kill: function() {
|
||||||
this.is_dead = true;
|
this.is_dead = true;
|
||||||
|
this.death.play();
|
||||||
ig.game.removeEntity(this);
|
ig.game.removeEntity(this);
|
||||||
ig.game.score = 0;
|
ig.game.score = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ ig.module(
|
|||||||
flip: true,
|
flip: true,
|
||||||
player: null,
|
player: null,
|
||||||
is_dead: false,
|
is_dead: false,
|
||||||
|
death: new ig.Sound('media/sounds/mouse-squeaking.*'),
|
||||||
|
|
||||||
animSheet: new ig.AnimationSheet('media/mouse.png', 26, 9),
|
animSheet: new ig.AnimationSheet('media/mouse.png', 26, 9),
|
||||||
|
|
||||||
@@ -81,6 +82,7 @@ ig.module(
|
|||||||
|
|
||||||
kill: function() {
|
kill: function() {
|
||||||
this.is_dead = true;
|
this.is_dead = true;
|
||||||
|
this.death.play();
|
||||||
this.speed = 0;
|
this.speed = 0;
|
||||||
this.collides = ig.Entity.COLLIDES.NEVER;
|
this.collides = ig.Entity.COLLIDES.NEVER;
|
||||||
setTimeout(function(){ig.game.removeEntity(this);}.bind(this), 500);
|
setTimeout(function(){ig.game.removeEntity(this);}.bind(this), 500);
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ MyGame = ig.Game.extend({
|
|||||||
boss: null,
|
boss: null,
|
||||||
score: 0,
|
score: 0,
|
||||||
checkpoint: null,
|
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() {
|
init: function() {
|
||||||
@@ -43,6 +46,19 @@ MyGame = ig.Game.extend({
|
|||||||
this.timer = new ig.Timer(5);
|
this.timer = new ig.Timer(5);
|
||||||
this.cheesetimer = new ig.Timer(15);
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function() {
|
update: function() {
|
||||||
@@ -57,6 +73,7 @@ MyGame = ig.Game.extend({
|
|||||||
|
|
||||||
if (this.currentLevel == LevelTitle) {
|
if (this.currentLevel == LevelTitle) {
|
||||||
//play title music
|
//play title music
|
||||||
|
//this.titlemusic.play();
|
||||||
if (ig.input.pressed('space')) {
|
if (ig.input.pressed('space')) {
|
||||||
this.loadLevel( LevelLevel1 );
|
this.loadLevel( LevelLevel1 );
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user