Commit 1cfc871e authored by 18손재민's avatar 18손재민

해상도 1980*1080으로 수정함

parent 2b16f502
...@@ -316,8 +316,8 @@ Input.inputField = ...@@ -316,8 +316,8 @@ Input.inputField =
{ {
generate: function(scene, enterCallback) generate: function(scene, enterCallback)
{ {
this.background = scene.add.sprite(640, 500, 'inputfield').setDepth(10); this.background = scene.add.sprite(game.config.width / 2, game.config.height * 25 / 36, 'inputfield').setDepth(10);
this.text = scene.add.text(640, 500, "", {font: '25pt 궁서'}).setOrigin(0.5, 0.5).setColor('#000000').setDepth(10); this.text = scene.add.text(game.config.width / 2, game.config.height * 25 / 36, "", {font: '25pt 궁서'}).setOrigin(0.5, 0.5).setColor('#000000').setDepth(10);
scene.input.keyboard.on('keyup', function() {Input.pressCount--; Input.justPressed = ''}) scene.input.keyboard.on('keyup', function() {Input.pressCount--; Input.justPressed = ''})
scene.input.keyboard.on('keydown-SHIFT', function() {Input.isShifted = true}); scene.input.keyboard.on('keydown-SHIFT', function() {Input.isShifted = true});
......
...@@ -57,7 +57,7 @@ var roomScene = new Phaser.Class( ...@@ -57,7 +57,7 @@ var roomScene = new Phaser.Class(
this.endTime = 0; this.endTime = 0;
this.peopleCount = 1; this.peopleCount = 1;
this.countText = this.add.text(game.config.width / 2, game.config.height / 2, '사람들을 위해 대기중입니다...').setOrigin(0.5, 0.5).setColor('#000000').setBackgroundColor('#ffffff').setDepth(10).setPadding(5,5,5,5); this.countText = this.add.text(game.config.width / 2, game.config.height / 2, '사람들을 위해 대기중입니다...').setOrigin(0.5, 0.5).setColor('#000000').setBackgroundColor('#ffffff').setDepth(10).setPadding(5,5,5,5);
this.peopleText = this.add.text(640, 80, '1 / 10').setOrigin(0.5, 0.5).setColor('#000000').setBackgroundColor('#ffffff').setDepth(10); this.peopleText = this.add.text(game.config.width / 2, game.config.height / 9, '1 / 10').setOrigin(0.5, 0.5).setColor('#000000').setBackgroundColor('#ffffff').setDepth(10);
}, },
update: function() update: function()
...@@ -72,20 +72,20 @@ var roomScene = new Phaser.Class( ...@@ -72,20 +72,20 @@ var roomScene = new Phaser.Class(
//console.log('end Count'); //console.log('end Count');
setTimeout(() => { setTimeout(() => {
socket.emit('endCount'); socket.emit('endCount');
}, (Phaser.Math.Distance.Between(0, 0, 640, 800) * 3)); }, (Phaser.Math.Distance.Between(0, 0, game.config.width / 2, game.config.height * 10 / 9) * 3));
this.isCounting = false; this.isCounting = false;
this.isCountEnd = true; this.isCountEnd = true;
this.players.forEach(function(element){ this.players.forEach(function(element){
element.follower = { t: 0, vec: new Phaser.Math.Vector2() }; element.follower = { t: 0, vec: new Phaser.Math.Vector2() };
element.path = new Phaser.Curves.Line([ element.path = new Phaser.Curves.Line([
element.sprite.x, element.sprite.y, element.sprite.x, element.sprite.y,
640, 800 game.config.width / 2, game.config.height * 10 / 9
]); ]);
ScenesData.roomScene.tweens.add({ ScenesData.roomScene.tweens.add({
targets: element.follower, targets: element.follower,
t: 1, t: 1,
ease: 'Linear', ease: 'Linear',
duration: Phaser.Math.Distance.Between(element.sprite.x, element.sprite.y, 640, 800) * 3, duration: Phaser.Math.Distance.Between(element.sprite.x, element.sprite.y, game.config.width / 2, game.config.height * 10 / 9) * 3,
repeat: 0 repeat: 0
}); });
}); });
...@@ -96,7 +96,7 @@ var roomScene = new Phaser.Class( ...@@ -96,7 +96,7 @@ var roomScene = new Phaser.Class(
this.players.forEach(function(element){ this.players.forEach(function(element){
element.path.getPoint(element.follower.t, element.follower.vec); element.path.getPoint(element.follower.t, element.follower.vec);
element.sprite.setPosition(element.follower.vec.x, element.follower.vec.y); element.sprite.setPosition(element.follower.vec.x, element.follower.vec.y);
element.nickname.setPosition(element.sprite.x - 10, element.sprite.y - 60); element.nickname.setPosition(element.sprite.x - game.config.width / 128, element.sprite.y - game.config.height / 12);
}); });
this.countText.setText('잠시만 기다려주세요...'); this.countText.setText('잠시만 기다려주세요...');
} }
......
class WordObject class WordObject
{ {
constructor(text, isNameWord = false) constructor(text, isNameWord = false)
{ {
this.generationCode = WordSpace.nextWordCode++; this.generationCode = WordSpace.nextWordCode++;
...@@ -267,8 +266,8 @@ class NameWord extends WordObject ...@@ -267,8 +266,8 @@ class NameWord extends WordObject
this.follower = { t: 0, vec: new Phaser.Math.Vector2() }; this.follower = { t: 0, vec: new Phaser.Math.Vector2() };
this.path = new Phaser.Curves.Spline([ this.path = new Phaser.Curves.Spline([
this.physicsObj.x, this.physicsObj.y, this.physicsObj.x, this.physicsObj.y,
(this.physicsObj.x + 500 + WordSpace.nameGroup.length * 15) / 2, this.physicsObj.y - 50, (this.physicsObj.x + game.config.width * (500 + WordSpace.nameGroup.length * 15) / 1280) / 2, this.physicsObj.y - game.config.height * 5 / 72,
500 + WordSpace.nameGroup.length * 15, 680 + this.wordText.length * 10 + (Math.random() * 20 - 10) game.config.width * (500 + WordSpace.nameGroup.length * 15) / 1280, game.config.height * (680 + this.wordText.length * 10 + (Math.random() * 20 - 10)) / 720
]); ]);
ScenesData.gameScene.tweens.add({ ScenesData.gameScene.tweens.add({
targets: this.follower, targets: this.follower,
......
...@@ -36,7 +36,7 @@ WordSpace.delay = ...@@ -36,7 +36,7 @@ WordSpace.delay =
WordSpace.NameSpawnReduce = 1000; WordSpace.NameSpawnReduce = 1000;
WordSpace.gravityPoint = {x: 640, y: 280}; WordSpace.gravityPoint = {x: 960, y: 420};
WordSpace.getSpawnPoint = function(_lenRate) WordSpace.getSpawnPoint = function(_lenRate)
{ {
...@@ -111,15 +111,15 @@ WordSpace.attackGauge = ...@@ -111,15 +111,15 @@ WordSpace.attackGauge =
gradeColor: ['#111124','#EBB435','#A42FFF','#1D22EB','#83947F'], gradeColor: ['#111124','#EBB435','#A42FFF','#1D22EB','#83947F'],
setRect: function() setRect: function()
{ {
this.rectUI.setSize(20 * this.value, 11); this.rectUI.setSize(game.config.width / 64 * this.value, game.config.height * 11 / 720);
this.rectUI.setPosition(640 - 10 * this.value, 547); this.rectUI.setPosition(game.config.width * (640 - 10 * this.value) / 1280, game.config.height * 547 / 720);
let tmp = this.getAttackOption(); let tmp = this.getAttackOption();
this.rectUI.setFillStyle(Phaser.Display.Color.HexStringToColor(this.gradeColor[tmp.wordGrade + 1]).color); this.rectUI.setFillStyle(Phaser.Display.Color.HexStringToColor(this.gradeColor[tmp.wordGrade + 1]).color);
}, },
generate: function(scene) generate: function(scene)
{ {
//console.log("created"); //console.log("created");
this.rectUI = scene.add.rectangle(640,600,0,11).setDepth(11); this.rectUI = scene.add.rectangle(game.config.width / 2, game.config.height * 5 / 6, 0, game.config.height * 11 / 720).setDepth(11);
}, },
add: function(plus) add: function(plus)
{ {
......
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