Fix: file name lower-upper case bug
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,68 @@
|
|||||||
|
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" };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user