Add: notice experience player text

This commit is contained in:
2018-09-27 14:08:20 +09:00
parent 988d289a70
commit d54b0b18a2
4 changed files with 48 additions and 1 deletions
+6
View File
@@ -50,6 +50,12 @@ var MenuApp = {
screenBottomUI.printRightText(sessionStorageManager.getPlayerName()); screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
new WelcomePlayerText(sessionStorageManager.getPlayerName()); new WelcomePlayerText(sessionStorageManager.getPlayerName());
if(isExperiencePlayerAccount()) {
game.time.events.add(Phaser.Timer.SECOND * 2.5,
(function() { new NoticeExperiencePlayerText(); } ),
this
);
}
this.loadAppData(); this.loadAppData();
@@ -0,0 +1,40 @@
function NoticeExperiencePlayerText() {
this.makeText(game.world.centerX, game.world.centerY - 90, "[ 체험 학생 기능 제한 ]", 28, "#f44");
this.makeText(game.world.centerX, game.world.centerY - 55, "- 체험용 앱만 실행 가능", 24, "#f44");
this.makeText(game.world.centerX, game.world.centerY - 25, "- 점수 저장, 랭킹 기능 제한 ", 24, "#f44");
this.makeText(game.world.centerX, game.world.centerY + 15, "마에스트로 유료 가입시, 모든 컨텐츠 / 기능 사용 가능", 28, "#fc5");
}
NoticeExperiencePlayerText.prototype.makeText = function(x, y, text, fontSize, fontColor) {
var newText = game.add.text(x, y, text, this.makeFontStyle(fontSize));
newText.anchor.set(0.5);
newText.inputEnabled = false;
// var grd = this.context.createLinearGradient(0, 0, 0, this.height);
// grd.addColorStop(0, '#8ED6FF');
// grd.addColorStop(1, '#4C6CB3');
newText.fill = fontColor; // grd;
newText.setShadow(1, 1, 'rgba(0, 0, 0, 0.5)', 1);
newText.stroke = '#000';
newText.strokeThickness = 5;
newText.alpha = 1;
let tweenAlpha = game.add.tween(newText);
tweenAlpha.to( { alpha: 0 }, Phaser.Timer.SECOND * 5, Phaser.Easing.Back.In, true);
}
NoticeExperiencePlayerText.prototype.makeFontStyle = function(fontSize) {
return { font: fontSize + "px Arial", fill: "#f86", align: "left", boundsAlignH: "left", boundsAlignV: "bottom" };
}
NoticeExperiencePlayerText.prototype.destroySelf = function() {
this.destroy();
}
NoticeExperiencePlayerText.DEFAULT_TEXT_FONT = {
font: "32px Arial",
boundsAlignH: "center", // left, center. right
boundsAlignV: "middle", // top, middle, bottom
fill: "#fff"
}
+1 -1
View File
@@ -22,7 +22,7 @@ function WelcomePlayerText(playerName) {
this.alpha = 1; this.alpha = 1;
let tweenAlpha = game.add.tween(this); let tweenAlpha = game.add.tween(this);
tweenAlpha.to( { alpha: 0 }, 2000, Phaser.Easing.Back.In, true); tweenAlpha.to( { alpha: 0 }, Phaser.Timer.SECOND * 2, Phaser.Easing.Back.In, true);
game.add.existing(this); game.add.existing(this);
} }
+1
View File
@@ -28,6 +28,7 @@
<script src="../../game/menu/menu_app.js"></script> <script src="../../game/menu/menu_app.js"></script>
<script src="../../game/menu/main_menu_app.js"></script> <script src="../../game/menu/main_menu_app.js"></script>
<script src="../../game/menu/welcome_player_text.js"></script> <script src="../../game/menu/welcome_player_text.js"></script>
<script src="../../game/menu/notice_experience_player_text.js"></script>
<script src="../../game/menu/app_area_bg.js"></script> <script src="../../game/menu/app_area_bg.js"></script>