Commit 93abd960 authored by 18신대성's avatar 18신대성

이제 엔터로 로그인 가능

parent 9c3f21f8
function FirebaseClient() function FirebaseClient()
{ {
this.init(); this.init();
this.initEvent(); this.initEvent();
this.isGameStarted = false;
} }
FirebaseClient.prototype.init = function() FirebaseClient.prototype.init = function()
...@@ -69,6 +70,7 @@ FirebaseClient.prototype.setLogin = function() ...@@ -69,6 +70,7 @@ FirebaseClient.prototype.setLogin = function()
.then(function() .then(function()
{ {
game = new Phaser.Game(config); game = new Phaser.Game(config);
this.isGameStarted = true;
}); });
document.getElementById('mainTitle').style.display = 'none'; document.getElementById('mainTitle').style.display = 'none';
...@@ -235,7 +237,14 @@ FirebaseClient.prototype.updateUserData = function(key, valueChanged, replace = ...@@ -235,7 +237,14 @@ FirebaseClient.prototype.updateUserData = function(key, valueChanged, replace =
document.addEventListener('DOMContentLoaded', function() document.addEventListener('DOMContentLoaded', function()
{ {
window.fbClient = new FirebaseClient(); window.fbClient = new FirebaseClient();
document.onkeydown = function(e)
{
if (!fbClient.isGameStarted && e.keyCode === 13)
{
fbClient.onEmailBtnClick();
}
}
console.log('done load'); console.log('done load');
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment