diff --git a/resources/image/ads/app_store.png b/resources/image/ads/app_store.png new file mode 100755 index 0000000..72b43e0 Binary files /dev/null and b/resources/image/ads/app_store.png differ diff --git a/resources/image/ads/google_play_store.png b/resources/image/ads/google_play_store.png new file mode 100755 index 0000000..e471085 Binary files /dev/null and b/resources/image/ads/google_play_store.png differ diff --git a/resources/image/ads/shinssaem_banner.png b/resources/image/ads/shinssaem_banner.png new file mode 100755 index 0000000..4a22b5e Binary files /dev/null and b/resources/image/ads/shinssaem_banner.png differ diff --git a/src/game/start/Ads.js b/src/game/start/Ads.js deleted file mode 100644 index 2df4933..0000000 --- a/src/game/start/Ads.js +++ /dev/null @@ -1,68 +0,0 @@ -var Ads = { - - preload: function() { - game.load.image('ads_image', '../../../resources/image/ads/shinssaem.png'); - }, - - create: function() { - this.counter = 3; - - this.game.stage.backgroundColor = '#4d4d4d'; - - - // top ui - var screenTopUI = new ScreenTopUI(); - - - // contents - var titleText = game.add.text(game.world.centerX, game.world.centerY - 250, "광고", this.getFontStyle(64, "#88bbff")); - titleText.anchor.set(0.5); - titleText.fontWeight = "bold"; - titleText.stroke = "#338"; - titleText.strokeThickness = 4; - - game.add.text(game.world.centerX, game.world.centerY - 200, - "Sponsored by", - this.getFontStyle(32, "#888")) - .anchor.set(0.5); - - var sprite = game.add.sprite(game.world.centerX, game.world.centerY, "ads_image"); - sprite.anchor.set(0.5); - var width = sprite.width; - var height = sprite.height; - if(width > height) - sprite.scale.set(300 / width); - else - sprite.scale.set(300 / height); - - this.skipText = game.add.text(game.world.centerX, game.world.centerY + 200, - "3초 후에 게임 화면으로 넘어갑니다.", - this.getFontStyle(32, "#888")); - this.skipText.anchor.set(0.5); - - game.add.text(game.world.centerX, game.world.centerY + 250, - "유료 마에스트로 계정으로 등록하면 광고 화면이 생략됩니다.", - this.getFontStyle(32, "#ffce54")) - .anchor.set(0.5); - - - // bottom ui - var screenBottomUI = new ScreenBottomUI(); - - - game.time.events.loop(Phaser.Timer.SECOND, this.updateCounter, this); - }, - - updateCounter: function() { - this.counter--; - if(this.counter == 0) - game.state.start('Start'); - else - this.skipText.text = this.counter + "초 후에 게임 화면으로 넘어갑니다."; - }, - - getFontStyle: function(fontSize, fillColor) { - return { font: fontSize + "px Arial", fill: fillColor, align: "left", boundsAlignH: "left", boundsAlignV: "bottom" }; - } - -} \ No newline at end of file diff --git a/src/game/start/ads.js b/src/game/start/ads.js index 2df4933..2106118 100644 --- a/src/game/start/ads.js +++ b/src/game/start/ads.js @@ -1,7 +1,7 @@ var Ads = { preload: function() { - game.load.image('ads_image', '../../../resources/image/ads/shinssaem.png'); + game.load.image('ads_image', '../../../resources/image/ads/shinssaem_banner.png'); }, create: function() { @@ -30,10 +30,13 @@ var Ads = { sprite.anchor.set(0.5); var width = sprite.width; var height = sprite.height; - if(width > height) - sprite.scale.set(300 / width); - else - sprite.scale.set(300 / height); + if(width > 800) { + var ratio = 300 / width; + sprite.scale.set(ratio); + } else if(height > 300) { + var ratio = 300 / height; + sprite.scale.set(ratio); + } this.skipText = game.add.text(game.world.centerX, game.world.centerY + 200, "3초 후에 게임 화면으로 넘어갑니다.",