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 jaems

I'm a newbie and trying to figure this out. I think it should be simple, just not sure how to go about doing it.

In each level, the player has to collect a certain amount of items to progress to the next. I want it so that in between each of these levels, there is a black screen with white text that narrates the story in between.

So pretty much Level1 (collect 3 coins) -> Black Screen w/ Text (press space to continue -> Level2 (collect 4 coins) and so on

I imagine I'd have to have somewhere in main.js where I keep track of the current level and reset the player entity's coin count

Thanks in advance guys.

1 decade ago by Donzo

I just draw images over the canvas using the
draw function in the main.js.

This allows entities to load and the
camera to get into position behind the drawing.


draw: function() {
	this.parent();
	
	//Global variable controlled by coins or whatever
	if (ig.game.cutScene == true) {
                  this.cutOne.draw(0, 0);
        }
}


The cutscene image needs to be preloaded
as all other images.

I have function within the player turn it off
after the player clicks or presses space.
Page 1 of 1
« first « previous next › last »