Aah.. Fixed it. There is a typo. The timer is 'introTimer' not 'timer' as referred in the init method.
Fixed init method...
init: function() {
this.introTimer = new ig.Timer(30);
},
So you want to make a title screen?

There were some questions and I personally struggled with it when I started with Impact - so here we go.
Check zipped file for the whole code as there are some issues when displaying the code.
Check the zip for the full source... Its fairly simple add this at the end of your main.js before your canvas call. Intro = ig.Class.extend({ introTimer: null, font: new ig.Font( 'media/04b03.font.png' ), init: function() { this.timer = new ig.Timer(30); ............
Its fairly simple to achieve. The whole idea is to create additional class extension that will hold your intro screen and then just switch between them using ig.system.setGame() call.
To ensure consistency make sure stuff like score or lives is held in a global variable rather as an attribute of your game object as every time you change the to intro and then to game your data will be reset.
Contributed by:
Jerczu
View Profile
Jerczu
Category:Game Elements
Updated:October 2, 2011
Rating:
Your Rating (0)
Average Rating (4)
