1     /**
2         The ApplicationManager is used to manage the application itself.
3         @author <a href="mailto:matthewcasperson@gmail.com">Matthew Casperson</a>
4         @class
5     */
6     function ApplicationManager()
7 {
8 /** 9 Initialises this object 10 @param canvasWidth The width of the canvas 11 @param canvasHeight The height of the canvas 12 @return A reference to the initialised object 13 14 */ 15 this.startupApplicationManager = function(canvasWidth, canvasHeight)
16 {
17 this.level = new Level().startupLevel(canvasWidth, canvasHeight);
18 this.background3 = new RepeatingGameObject().startupRepeatingGameObject(g_back2, 0, 100, 3, 600, 320, 0.75);
19 this.background2 = new RepeatingGameObject().startupRepeatingGameObject(g_back1, 0, 100, 2, 600, 320, 0.5);
20 this.background = new RepeatingGameObject().startupRepeatingGameObject(g_back0, 0, 0, 1, 600, 320, 0.25);
21 g_player = new Player().startupPlayer(this.level);
22 this.updateScore();
23 return this;
24 }
25 26 this.updateScore = function()
27 {
28 var score = document.getElementById("Score");
29 score.innerHTML = String(g_score);
30 }
31 }
Top