Add: SessionStorageManager

This commit is contained in:
2018-05-09 11:02:42 +09:00
parent f44cabcb01
commit 4b58ceb305
12 changed files with 113 additions and 39 deletions
+5 -8
View File
@@ -12,9 +12,7 @@ let MenuApp = {
// top
let backButton = new BackButton( () => {
sessionStorage.removeItem("playerName");
sessionStorage.removeItem("playerUserID");
sessionStorage.removeItem("playingAppName");
sessionStorageManager.clear();
location.href = '../../web/client/login.html';
});
@@ -25,9 +23,7 @@ let MenuApp = {
// app icons
let space_invaders = new AppButton(AppButton.TYPE_MOUSE, "icon_fullscreen",
() => {
sessionPlayingAppName = "space_invaders";
sessionStorage.setItem("playingAppName", sessionPlayingAppName);
sessionStorageManager.playingAppName = "space_invaders";
location.href = '../../web/client/start.html';
}
);
@@ -45,8 +41,9 @@ let MenuApp = {
let screenBottom = new ScreenBottom(game);
screenBottom.makeBottomLine();
// screenBottom.printBottomLeftText("게임 진행 정보");
screenBottom.printBottomCenterText(appInfoManager.getAppNameKorean(sessionPlayingAppName));
screenBottom.printBottomRightText(sessionPlayerName);
let playingAppName = appInfoManager.getAppNameKorean(sessionStorageManager.playingAppName);
screenBottom.printBottomCenterText(playingAppName);
screenBottom.printBottomRightText(sessionStorageManager.playerName);
// this.loadTypingStageData();
},