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.kawaiichibiavatarmaker" urlLink = "https://www.kawaiigames.net/?utm_source=html5-kawaii-chibi-avatar-maker&utm_medium=html5-kawaii-chibi-avatar-maker&utm_campaign=html5-kawaii-chibi-avatar-maker"; var ClickSfx; var CloseSfx; var ConfirmSfx; } titleScreen.prototype = { create: function() { tweenCount = 1; /* window.famobi_analytics.trackEvent( famobi_analytics.EVENT_LEVELSTART, { levelName: 'titleScreen', } ); window.famobi_analytics.trackScreen("SCREEN_HOME", "Title_Screen").then(function() { console.log("Success..."); }).catch(function() { console.log("Fail..."); }); //<< Continue analytics check... window.famobi.onOrientationChange(function() { console.log(window.famobi.getOrientation(), window.innerWidth, window.innerHeight); }); */ 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"); if (this.game.sound.usingWebAudio && this.game.sound.context.state === 'suspended' && !MuteBool) { this.game.input.onTap.addOnce(game.sound.context.resume, game.sound.context); } Play_Btn = this.add.sprite(279,435,"play_btn",function() { adStart(this.game.sound); window[preroll.config.loaderObjectName].refetchAd(); this.state.start("DressUp"); },this,1,0,2); 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() { window.famobi.showAd(); this.state.start("DressUp"); },this); },this); */ 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); }, }