mirror of
https://github.com/IllusionMan1212/adventures-of-kuroneko.git
synced 2026-10-24 02:12:36 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
ig.module(
|
||||
'game.entities.endgame'
|
||||
)
|
||||
.requires(
|
||||
'impact.entity',
|
||||
'game.entities.kuroneko',
|
||||
'game.entities.nextlevel',
|
||||
)
|
||||
.defines(function() {
|
||||
EntityEndgame = EntityNextlevel.extend({
|
||||
check: function( other ) {
|
||||
if(other instanceof EntityKuroneko){
|
||||
this.player = ig.game.getEntitiesByType(EntityKuroneko)[0];
|
||||
this.player.currentAnim = this.player.anims.nothing;
|
||||
this.player.speed = 0;
|
||||
if (ig.game.score == 0 || ig.game.score == 10000) {
|
||||
setTimeout(function() {ig.game.loadLevel( LevelGoodend );}.bind(this), 1000);
|
||||
} else {
|
||||
setTimeout(function() {ig.game.loadLevel( LevelBadend );}.bind(this), 1000);
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user