diff --git a/dev/lib/game/main.js b/dev/lib/game/main.js index 7d7d625..9ebdf90 100755 --- a/dev/lib/game/main.js +++ b/dev/lib/game/main.js @@ -123,7 +123,7 @@ ig.module( init: function() { ig.input.bind(ig.KEY.ENTER, 'submit-score'); ig.input.bind(ig.KEY.ESCAPE, 'main-menu'); - this.nameField = ig.game.spawnEntity(EntityNameField, 250, 150); + this.nameField = ig.game.spawnEntity(EntityNameField, 363, 219); this.loadScores(); }, @@ -132,7 +132,7 @@ ig.module( ig.system.setGame(StartScreen); } - if (ig.input.pressed('submit-score')) { + if (ig.input.pressed('submit-score') && this.nameField !== null) { this.saveScore(this.nameField.name(), ig.global.score, function(context) { setTimeout(function() { context.loadScores(); }, 2000); }); @@ -173,7 +173,7 @@ ig.module( } } - if (this.nameField !== null) this.nameField.draw(260, 200); + if (this.nameField !== null) this.nameField.draw(); this.font.draw(ig.global.score, 485, 150, ig.Font.ALIGN.RIGHT); } });