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

해상도 변경 wip

parent dcbdc78c
......@@ -12,20 +12,20 @@ BackGround.loadImage = 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)
{
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)
{
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)
{
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
if (msg === 'gameWin')
{
//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)
.setColor('#000000').setBackgroundColor('#ffffff');
}
......
......@@ -56,7 +56,7 @@ var roomScene = new Phaser.Class(
this.isCountEnd = false;
this.endTime = 0;
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);
},
......
......@@ -15,7 +15,7 @@ class WordObject
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.fontScale = 25;
var random = WordSpace.getSpawnPoint(lenRate);
......
......@@ -277,7 +277,7 @@ function gameOver()
socket.emit('defeated');
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)
.setColor('#000000').setBackgroundColor('#ffffff');
//alert('defeat');
......
var config = {
type: Phaser.AUTO,
width: 1280,
height: 720,
width: 1920,
height: 1080,
scale: {
mode: Phaser.Scale.FIT,
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