|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
var menuState = {
|
|
var menuState = {
|
|
create: function(){},
|
|
create: function(){},
|
|
- loadGame: function(){},
|
|
|
|
|
|
+ func_loadGame: function(){},
|
|
---------------------------- end of phaser functions
|
|
---------------------------- end of phaser functions
|
|
func_showTitle: function(){},
|
|
func_showTitle: function(){},
|
|
func_clearTitle: function(){},
|
|
func_clearTitle: function(){},
|
|
@@ -35,7 +35,7 @@ var menuState = {
|
|
|
|
|
|
// Subtitle : Game mode
|
|
// Subtitle : Game mode
|
|
var style_game = { font: "27px Arial", fill: "#003cb3", align: "center" };
|
|
var style_game = { font: "27px Arial", fill: "#003cb3", align: "center" };
|
|
- var lbl_game = game.add.text(this.game.world.centerX, 110, "BOBHAOSHSOHAIOSH", style_game);
|
|
|
|
|
|
+ var lbl_game = game.add.text(this.game.world.centerX, 110, "", style_game);
|
|
lbl_game.anchor.setTo(0.5,0.5);
|
|
lbl_game.anchor.setTo(0.5,0.5);
|
|
|
|
|
|
// BUTTONS
|
|
// BUTTONS
|
|
@@ -67,70 +67,70 @@ var menuState = {
|
|
menu1.anchor.setTo(0.5, 0.5);
|
|
menu1.anchor.setTo(0.5, 0.5);
|
|
menu1.inputEnabled = true;
|
|
menu1.inputEnabled = true;
|
|
menu1.input.useHandCursor = true;
|
|
menu1.input.useHandCursor = true;
|
|
- menu1.events.onInputDown.add(this.loadGame,{levelType:1, beep: beepSound, shape : "Square", label : true});
|
|
|
|
|
|
+ menu1.events.onInputDown.add(this.func_loadGame,{levelType:1, beep: beepSound, shape : "Square", label : true});
|
|
menu1.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Square", label : true, menu: menu1, lbl_game: lbl_game});
|
|
menu1.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Square", label : true, menu: menu1, lbl_game: lbl_game});
|
|
menu1.events.onInputOut.add(this.func_clearTitle, {menu: menu1, lbl_game: lbl_game});
|
|
menu1.events.onInputOut.add(this.func_clearTitle, {menu: menu1, lbl_game: lbl_game});
|
|
|
|
|
|
menu2.anchor.setTo(0.5, 0.5);
|
|
menu2.anchor.setTo(0.5, 0.5);
|
|
menu2.inputEnabled = true;
|
|
menu2.inputEnabled = true;
|
|
menu2.input.useHandCursor = true;
|
|
menu2.input.useHandCursor = true;
|
|
- menu2.events.onInputDown.add(this.loadGame,{levelType:1, beep: beepSound, shape : "Square", label : false});
|
|
|
|
|
|
+ menu2.events.onInputDown.add(this.func_loadGame,{levelType:1, beep: beepSound, shape : "Square", label : false});
|
|
menu2.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Square", label : false, menu: menu2, lbl_game: lbl_game});
|
|
menu2.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Square", label : false, menu: menu2, lbl_game: lbl_game});
|
|
menu2.events.onInputOut.add(this.func_clearTitle, {menu: menu2, lbl_game: lbl_game});
|
|
menu2.events.onInputOut.add(this.func_clearTitle, {menu: menu2, lbl_game: lbl_game});
|
|
|
|
|
|
menu3.anchor.setTo(0.5, 0.5);
|
|
menu3.anchor.setTo(0.5, 0.5);
|
|
menu3.inputEnabled = true;
|
|
menu3.inputEnabled = true;
|
|
menu3.input.useHandCursor = true;
|
|
menu3.input.useHandCursor = true;
|
|
- menu3.events.onInputDown.add(this.loadGame,{levelType:2, beep: beepSound, shape : "Square", label : true});
|
|
|
|
|
|
+ menu3.events.onInputDown.add(this.func_loadGame,{levelType:2, beep: beepSound, shape : "Square", label : true});
|
|
menu3.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Square", label : true, menu: menu3, lbl_game: lbl_game});
|
|
menu3.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Square", label : true, menu: menu3, lbl_game: lbl_game});
|
|
menu3.events.onInputOut.add(this.func_clearTitle, {menu: menu3, lbl_game: lbl_game});
|
|
menu3.events.onInputOut.add(this.func_clearTitle, {menu: menu3, lbl_game: lbl_game});
|
|
|
|
|
|
menu4.anchor.setTo(0.5, 0.5);
|
|
menu4.anchor.setTo(0.5, 0.5);
|
|
menu4.inputEnabled = true;
|
|
menu4.inputEnabled = true;
|
|
menu4.input.useHandCursor = true;
|
|
menu4.input.useHandCursor = true;
|
|
- menu4.events.onInputDown.add(this.loadGame,{levelType:2, beep: beepSound, shape : "Square", label : false});
|
|
|
|
|
|
+ menu4.events.onInputDown.add(this.func_loadGame,{levelType:2, beep: beepSound, shape : "Square", label : false});
|
|
menu4.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Square", label : false, menu: menu4, lbl_game: lbl_game});
|
|
menu4.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Square", label : false, menu: menu4, lbl_game: lbl_game});
|
|
menu4.events.onInputOut.add(this.func_clearTitle, {menu: menu4, lbl_game: lbl_game});
|
|
menu4.events.onInputOut.add(this.func_clearTitle, {menu: menu4, lbl_game: lbl_game});
|
|
|
|
|
|
menu5.anchor.setTo(0.5, 0.5);
|
|
menu5.anchor.setTo(0.5, 0.5);
|
|
menu5.inputEnabled = true;
|
|
menu5.inputEnabled = true;
|
|
menu5.input.useHandCursor = true;
|
|
menu5.input.useHandCursor = true;
|
|
- menu5.events.onInputDown.add(this.loadGame,{levelType:1, beep: beepSound, shape : "Circle", label : true});
|
|
|
|
|
|
+ menu5.events.onInputDown.add(this.func_loadGame,{levelType:1, beep: beepSound, shape : "Circle", label : true});
|
|
menu5.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Circle", label : true, menu: menu5, lbl_game: lbl_game});
|
|
menu5.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Circle", label : true, menu: menu5, lbl_game: lbl_game});
|
|
menu5.events.onInputOut.add(this.func_clearTitle, {menu: menu5, lbl_game: lbl_game});
|
|
menu5.events.onInputOut.add(this.func_clearTitle, {menu: menu5, lbl_game: lbl_game});
|
|
|
|
|
|
menu6.anchor.setTo(0.5, 0.5);
|
|
menu6.anchor.setTo(0.5, 0.5);
|
|
menu6.inputEnabled = true;
|
|
menu6.inputEnabled = true;
|
|
menu6.input.useHandCursor = true;
|
|
menu6.input.useHandCursor = true;
|
|
- menu6.events.onInputDown.add(this.loadGame,{levelType:1, beep: beepSound, shape : "Circle", label : false});
|
|
|
|
|
|
+ menu6.events.onInputDown.add(this.func_loadGame,{levelType:1, beep: beepSound, shape : "Circle", label : false});
|
|
menu6.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Circle", label : false, menu: menu6, lbl_game: lbl_game});
|
|
menu6.events.onInputOver.add(this.func_showTitle,{levelType:1, beep: beepSound, shape : "Circle", label : false, menu: menu6, lbl_game: lbl_game});
|
|
menu6.events.onInputOut.add(this.func_clearTitle, {menu: menu6, lbl_game: lbl_game});
|
|
menu6.events.onInputOut.add(this.func_clearTitle, {menu: menu6, lbl_game: lbl_game});
|
|
|
|
|
|
menu7.anchor.setTo(0.5, 0.5);
|
|
menu7.anchor.setTo(0.5, 0.5);
|
|
menu7.inputEnabled = true;
|
|
menu7.inputEnabled = true;
|
|
menu7.input.useHandCursor = true;
|
|
menu7.input.useHandCursor = true;
|
|
- menu7.events.onInputDown.add(this.loadGame,{levelType:2, beep: beepSound, shape : "Circle", label : true});
|
|
|
|
|
|
+ menu7.events.onInputDown.add(this.func_loadGame,{levelType:2, beep: beepSound, shape : "Circle", label : true});
|
|
menu7.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Circle", label : true, menu: menu7, lbl_game: lbl_game});
|
|
menu7.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Circle", label : true, menu: menu7, lbl_game: lbl_game});
|
|
menu7.events.onInputOut.add(this.func_clearTitle, {menu: menu7, lbl_game: lbl_game});
|
|
menu7.events.onInputOut.add(this.func_clearTitle, {menu: menu7, lbl_game: lbl_game});
|
|
|
|
|
|
menu8.anchor.setTo(0.5, 0.5);
|
|
menu8.anchor.setTo(0.5, 0.5);
|
|
menu8.inputEnabled = true;
|
|
menu8.inputEnabled = true;
|
|
menu8.input.useHandCursor = true;
|
|
menu8.input.useHandCursor = true;
|
|
- menu8.events.onInputDown.add(this.loadGame,{levelType:2, beep: beepSound, shape : "Circle", label : false});
|
|
|
|
|
|
+ menu8.events.onInputDown.add(this.func_loadGame,{levelType:2, beep: beepSound, shape : "Circle", label : false});
|
|
menu8.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Circle", label : false, menu: menu8, lbl_game: lbl_game});
|
|
menu8.events.onInputOver.add(this.func_showTitle,{levelType:2, beep: beepSound, shape : "Circle", label : false, menu: menu8, lbl_game: lbl_game});
|
|
menu8.events.onInputOut.add(this.func_clearTitle, {menu: menu8, lbl_game: lbl_game});
|
|
menu8.events.onInputOut.add(this.func_clearTitle, {menu: menu8, lbl_game: lbl_game});
|
|
|
|
|
|
menu9.anchor.setTo(0.5, 0.5);
|
|
menu9.anchor.setTo(0.5, 0.5);
|
|
menu9.inputEnabled = true;
|
|
menu9.inputEnabled = true;
|
|
menu9.input.useHandCursor = true;
|
|
menu9.input.useHandCursor = true;
|
|
- menu9.events.onInputDown.add(this.loadGame,{levelType:3, beep: beepSound, shape : "Square", label : true});
|
|
|
|
|
|
+ menu9.events.onInputDown.add(this.func_loadGame,{levelType:3, beep: beepSound, shape : "Square", label : true});
|
|
menu9.events.onInputOver.add(this.func_showTitle,{levelType:3, beep: beepSound, shape : "Square", label : true, menu: menu9, lbl_game: lbl_game});
|
|
menu9.events.onInputOver.add(this.func_showTitle,{levelType:3, beep: beepSound, shape : "Square", label : true, menu: menu9, lbl_game: lbl_game});
|
|
menu9.events.onInputOut.add(this.func_clearTitle, {menu: menu9, lbl_game: lbl_game});
|
|
menu9.events.onInputOut.add(this.func_clearTitle, {menu: menu9, lbl_game: lbl_game});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
//calls the selected game menu screen
|
|
//calls the selected game menu screen
|
|
- loadGame: function(){
|
|
|
|
|
|
+ func_loadGame: function(){
|
|
|
|
|
|
if(audioStatus){
|
|
if(audioStatus){
|
|
this.beep.play();
|
|
this.beep.play();
|
|
@@ -150,14 +150,14 @@ var menuState = {
|
|
}
|
|
}
|
|
|
|
|
|
if(debugMode) console.log("Square One");
|
|
if(debugMode) console.log("Square One");
|
|
- game.state.start('menuSOne');
|
|
|
|
|
|
+ game.state.start('menuSquareOne');
|
|
|
|
|
|
}else if(this.levelType==3){
|
|
}else if(this.levelType==3){
|
|
|
|
|
|
- levelType = "";
|
|
|
|
|
|
+ levelType = "C";
|
|
|
|
|
|
- if(debugMode) console.log("Square Two");
|
|
|
|
- game.state.start('menuSTwo')
|
|
|
|
|
|
+ if(debugMode) console.log("Square Two, "+levelType);
|
|
|
|
+ game.state.start('menuSquareTwo')
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -170,7 +170,7 @@ var menuState = {
|
|
}
|
|
}
|
|
|
|
|
|
if(debugMode) console.log("Circle One");
|
|
if(debugMode) console.log("Circle One");
|
|
- game.state.start('menuCOne');
|
|
|
|
|
|
+ game.state.start('menuCircleOne');
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|