Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Dhoombaby

Hi ...

Now my game is almost over...just i want that when player completes last level then game over screen should display...i have used this game over screen when player loses all his 3 lives but i also want it when he completes all three levels...how do i come to know that player has completed last level?? Any help?? Required urgently..

1 decade ago by Joncom

You're going to have to keep track of what level the player is currently on. It could be by "number" or by "name", but when the final level is complete, and you know this because you've been keeping track, then you load the game over screen. You know the level is complete the same what you usually know to change to the next level. Does that make sense?

Edit:

MyGame = ig.Game.extend({
    currentLevel: null // Make sure you set this 
                       // each time you change levels.
});
Page 1 of 1
« first « previous next › last »