Add: ESC key back(), Enter key start/restart to all features
This commit is contained in:
@@ -10,12 +10,18 @@ var Game = {
|
||||
(function() { this.gameOver(); }).bind(this)
|
||||
);
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
null, // keyDownHandler
|
||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||
"space invaders" // callerClassName
|
||||
);
|
||||
|
||||
// top ui
|
||||
var screenTopUI = new ScreenTopUI();
|
||||
screenTopUI.makeBackButton( function() {
|
||||
sessionStorageManager.resetPlayingAppData();
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
});
|
||||
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
|
||||
screenTopUI.makeFullScreenButton();
|
||||
|
||||
var scoreBoard = new ScoreBoard();
|
||||
@@ -83,6 +89,12 @@ var Game = {
|
||||
// this.countDown();
|
||||
},
|
||||
|
||||
|
||||
back: function() {
|
||||
sessionStorageManager.resetPlayingAppData();
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
},
|
||||
|
||||
initListeners: function() {
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user