Add: AppButton

This commit is contained in:
2018-05-08 07:36:09 +09:00
parent 52207c5dd4
commit 49ac6dacb3
4 changed files with 86 additions and 2 deletions
+19
View File
@@ -10,6 +10,7 @@ let MenuApp = {
create: function() {
this.game.stage.backgroundColor = '#4d4d4d';
// top
let backButton = new BackButton( () => {
sessionStorage.removeItem("playerName");
sessionStorage.removeItem("playerUserID");
@@ -19,6 +20,24 @@ let MenuApp = {
let fullscreenButton = new FullscreenButton(this.game);
// app icons
let space_invaders = new AppButton(AppButton.TYPE_MOUSE, "icon_fullscreen",
() => {
console.log("space invaders");
}
);
space_invaders.move(400, 400);
let typing_practice = new AppButton(AppButton.TYPE_TYPING, "icon_fullscreen",
() => {
console.log("typing practice");
}
);
typing_practice.move(600, 400);
// bottom
let screenBottom = new ScreenBottom(game);
screenBottom.makeBottomLine();
// screenBottom.printBottomLeftText("게임 진행 정보");