OwlCyberSecurity - MANAGER
Edit File: titlescreen.js
var titleScreen = function(game) { MuteBool = false; MuteSfx = false; gamepaused = false; GameTitle = "kawaii-chibi-avatar-maker"; gpLink = "https://play.google.com/store/apps/details?id=air.net.kawaiigames.SailorScoutsAvatarMaker" urlLink = "https://www.kawaiigames.net/?utm_source=html5-" + GameTitle + "&utm_medium=html5-" + GameTitle + "&utm_campaign=html5-" + GameTitle; var ClickSfx; var CloseSfx; var ConfirmSfx; } titleScreen.prototype = { create: function() { tweenCount = 1; BgMusic = this.add.audio("backgroundmusic"); BgMusic.loop = true; BgMusic.volume = .3; BgMusic.play(); ClickSfx = this.add.audio("clicksfx"); ClickSfx.volume = 2; CloseSfx = this.add.audio("closesfx"); CloseSfx.volume = 2; ConfirmSfx = this.add.audio("confirmsfx"); ConfirmSfx.volume = 2; CenterX = this.world.centerX; CenterY = this.world.centerY; Background = this.add.image(0,0,"intro_screen"); Play_Btn = this.add.sprite(279,435,"play_btn"); Play_Btn.anchor.setTo(0.5,0.5); Play_Btn.inputEnabled = true; Play_Btn.events.onInputDown.add(function() { ClickSfx.play(); Play_Btn.scale.setTo(0.9); },this); Play_Btn.events.onInputUp.add(function() { Play_Btn.scale.setTo(1); Play_Btn.inputEnabled = false; this.game.time.events.add(1000,function() { adStart(this.game.sound); window[preroll.config.loaderObjectName].refetchAd(); this.state.start("DressUp"); },this); },this); /*Logo = this.add.button(86,435,"logo_small",function() { window.open(urlLink, "_blank"); },this); Logo.anchor.setTo(0.5,0.5); GP_Btn = this.add.button(322,495,"gp_btn",function() { window.open(gpLink,"_blank"); },this); GP_Btn.anchor.setTo(0.5,0.5);*/ Intro_Circle = this.add.image(747,271,"intro_circle"); Intro_Circle.anchor.setTo(0.5,0.5); Intro_Circle2 = this.add.image(745,269,"intro_circle2"); Intro_Circle2.anchor.setTo(0.5,0.5); Doll1 = this.add.sprite(742,Intro_Circle.y + Intro_Circle.height + 100,"doll1");//367 Doll1.anchor.setTo(0.5,0.5); Doll2 = this.add.sprite(744,Intro_Circle.y + Intro_Circle.height + 100,"doll2");//376 Doll2.anchor.setTo(0.5,0.5); Doll3 = this.add.sprite(744,Intro_Circle.y + Intro_Circle.height + 100,"doll3");//372 Doll3.anchor.setTo(0.5,0.5); Doll4 = this.add.sprite(748,Intro_Circle.y + Intro_Circle.height + 100,"doll4");//370 Doll4.anchor.setTo(0.5,0.5); Mask = this.add.graphics(Intro_Circle2.x-2,Intro_Circle2.y-1); Mask.anchor.setTo(0.5,0.5); Mask.beginFill(0x000000); Mask.drawCircle(0,0,300); Mask.endFill(); Doll1.mask = Mask; Doll2.mask = Mask; Doll3.mask = Mask; Doll4.mask = Mask; this.Tween_In(Doll4,370,Intro_Circle.y + Intro_Circle.height + 100); }, update: function() { }, Tween_In: function(obj,objToY,objFromY) { Doll_In = this.add.tween(obj).to({y: objToY},1000,Phaser.Easing.Linear.None,true); Doll_In.onComplete.add(function() { this.game.time.events.add(1500,function() { this.Tween_Out(obj,objFromY); },this); },this); }, Tween_Out: function(obj,objFromY) { Doll_Out = this.add.tween(obj).to({y: objFromY},1000,Phaser.Easing.Linear.None,true); Doll_Out.onComplete.add(function() { tweenCount++; this.game.time.events.add(1000,function() { if(tweenCount == 2) { this.Tween_In(Doll2,376,Intro_Circle.y + Intro_Circle.height + 100); } if(tweenCount == 3) { this.Tween_In(Doll3,372,Intro_Circle.y + Intro_Circle.height + 100); } if(tweenCount == 4) { this.Tween_In(Doll1,367,Intro_Circle.y + Intro_Circle.height + 100); } if(tweenCount == 5) { tweenCount = 1; this.Tween_In(Doll4,370,Intro_Circle.y + Intro_Circle.height + 100); } },this); },this); }, }