Add: seperate ads page from start page and apply Google Analytics code

This commit is contained in:
2018-11-21 09:28:38 +09:00
parent 0f77430e9e
commit 07d8b46b38
7 changed files with 111 additions and 10 deletions
@@ -59,7 +59,7 @@ var Ads = {
updateCounter: function() {
this.counter--;
if(this.counter == 0)
game.state.start('Start');
location.href = '../../web/client/start.html';
else
this.skipText.text = this.counter + "초 후에 게임 화면으로 넘어갑니다.";
},
+13
View File
@@ -0,0 +1,13 @@
/////////////////////////////
// Main game
var CONTENT_ID = "Ads";
var game = new Phaser.Game(
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
Phaser.CANVAS, CONTENT_ID
);
game.state.add('Ads', Ads);
game.state.start('Ads');
+4 -1
View File
@@ -83,7 +83,10 @@ GameAppButton.prototype.clickEvent = function() {
sessionStorageManager.setPlayingAppName(this.appInfo.AppName);
sessionStorageManager.setPlayingAppKoreanName(this.appInfo.KoreanName);
location.href = '../../web/client/start.html';
if(isExperiencePlayerAccount())
location.href = '../../web/client/ads.html';
else
location.href = '../../web/client/start.html';
}
+4 -1
View File
@@ -105,7 +105,10 @@ TypingAppButton.prototype.clickEvent = function() {
sessionStorageManager.setPlayingAppName(this.appInfo.AppName);
sessionStorageManager.setPlayingAppKoreanName(this.appInfo.KoreanName);
location.href = '../../web/client/start.html';
if(isExperiencePlayerAccount())
location.href = '../../web/client/ads.html';
else
location.href = '../../web/client/start.html';
}
+1 -6
View File
@@ -10,9 +10,4 @@ var game = new Phaser.Game(
game.state.add('Start', Start);
game.state.add('Ads', Ads);
if(isExperiencePlayerAccount())
game.state.start('Ads');
else
game.state.start('Start');
game.state.start('Start');