Commit 2b16f502 authored by 18손재민's avatar 18손재민

해상도 변경 wip

parent dcbdc78c
...@@ -12,20 +12,20 @@ BackGround.loadImage = function(scene) ...@@ -12,20 +12,20 @@ BackGround.loadImage = function(scene)
BackGround.drawCharacter = function(scene) BackGround.drawCharacter = function(scene)
{ {
BackGround.myCharacter = scene.add.sprite(640, 615, 'pyeongminWrite').setScale(0.45).setDepth(2); BackGround.myCharacter = scene.add.sprite(game.config.width / 2, game.config.height * 41 / 48, 'pyeongminWrite').setScale(0.45).setDepth(2);
} }
BackGround.drawBrain = function(scene) BackGround.drawBrain = function(scene)
{ {
brains = scene.add.sprite(640, 360, 'brainGround').setDisplaySize(1282, 722).setDepth(1); brains = scene.add.sprite(game.config.width / 2, game.config.height / 2, 'brainGround').setDisplaySize(game.config.width, game.config.height).setDepth(1);
} }
BackGround.drawMenu = function(scene) BackGround.drawMenu = function(scene)
{ {
scene.add.sprite(640, 360, 'menuBackground').setDisplaySize(1282, 722).setDepth(1); scene.add.sprite(game.config.width / 2, game.config.height / 2, 'menuBackground').setDisplaySize(game.config.width, game.config.height).setDepth(1);
} }
BackGround.drawRoom = function(scene) BackGround.drawRoom = function(scene)
{ {
scene.add.sprite(640, 360, 'roomBackground').setDisplaySize(1282, 722).setDepth(1); scene.add.sprite(game.config.width / 2, game.config.height / 2, 'roomBackground').setDisplaySize(game.config.width, game.config.height).setDepth(1);
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ socket.on('alert', function(msg) // string errorcode ...@@ -10,7 +10,7 @@ socket.on('alert', function(msg) // string errorcode
if (msg === 'gameWin') if (msg === 'gameWin')
{ {
//toAlert = '승리!'; //toAlert = '승리!';
ScenesData.gameScene.add.text(640, 360, '승리!!!!', {fontSize: '30pt'}) ScenesData.gameScene.add.text(game.config.width / 2, game.config.height / 2, '승리!!!!', {fontSize: '30pt'})
.setPadding(5,5,5,5).setOrigin(0.5, 0.5).setDepth(11) .setPadding(5,5,5,5).setOrigin(0.5, 0.5).setDepth(11)
.setColor('#000000').setBackgroundColor('#ffffff'); .setColor('#000000').setBackgroundColor('#ffffff');
} }
......
...@@ -56,7 +56,7 @@ var roomScene = new Phaser.Class( ...@@ -56,7 +56,7 @@ var roomScene = new Phaser.Class(
this.isCountEnd = false; this.isCountEnd = false;
this.endTime = 0; this.endTime = 0;
this.peopleCount = 1; this.peopleCount = 1;
this.countText = this.add.text(640, 360, '사람들을 위해 대기중입니다...').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(640, 80, '1 / 10').setOrigin(0.5, 0.5).setColor('#000000').setBackgroundColor('#ffffff').setDepth(10);
}, },
......
...@@ -15,7 +15,7 @@ class WordObject ...@@ -15,7 +15,7 @@ class WordObject
instantiate(scene, lenRate) instantiate(scene, lenRate)
{ {
let p = [{x : 3, y : 0.7}, {x : 20, y : 1.2}]; let p = [{x : 3, y : 1.05}, {x : 20, y : 1.85}];
this.scale = ((p[1].y - p[0].y) / (p[1].x - p[0].x)) * (this.wordWeight - p[0].x) + p[0].y; this.scale = ((p[1].y - p[0].y) / (p[1].x - p[0].x)) * (this.wordWeight - p[0].x) + p[0].y;
this.fontScale = 25; this.fontScale = 25;
var random = WordSpace.getSpawnPoint(lenRate); var random = WordSpace.getSpawnPoint(lenRate);
......
...@@ -277,7 +277,7 @@ function gameOver() ...@@ -277,7 +277,7 @@ function gameOver()
socket.emit('defeated'); socket.emit('defeated');
console.log('defeat'); console.log('defeat');
ScenesData.gameScene.add.text(640, 360, '패배', {fontSize: '30pt'}) ScenesData.gameScene.add.text(game.config.width / 2, game.config.height / 2, '패배', {fontSize: '30pt'})
.setPadding(5,5,5,5).setOrigin(0.5, 0.5).setDepth(10) .setPadding(5,5,5,5).setOrigin(0.5, 0.5).setDepth(10)
.setColor('#000000').setBackgroundColor('#ffffff'); .setColor('#000000').setBackgroundColor('#ffffff');
//alert('defeat'); //alert('defeat');
......
var config = { var config = {
type: Phaser.AUTO, type: Phaser.AUTO,
width: 1280, width: 1920,
height: 720, height: 1080,
scale: { scale: {
mode: Phaser.Scale.FIT, mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH autoCenter: Phaser.Scale.CENTER_BOTH
......
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