OwlCyberSecurity - MANAGER
Edit File: titlescreen.js
var titleScreen = function(game) { MuteBool = false; gamepaused = false; GameTitle = "kawaii-super-hero-maker"; gpLink = "https://play.google.com/store/apps/details?id=air.net.kawaiigames.SailorScoutsAvatarMaker" urlLink = "https://www.kawaiigames.net/?utm_source=html5-kawaii-superhero-avatar-maker&utm_medium=html5-kawaii-superhero-avatar-maker&utm_campaign=html5-kawaii-superhero-avatar-maker"; } titleScreen.prototype = { create: function() { BgMusic = this.add.audio("backgroundmusic"); BgMusic.loop = true; BgMusic.volume = 1; BgMusic.play(); CenterX = this.world.centerX; CenterY = this.world.centerY; Background = this.add.image(0,0,"intro_screen"); //Ref = this.add.image(0,0,"ref"); /*GP_Btn = this.add.button(322,495,"gp_btn",function() { window.open(gpLink,"_blank"); },this); GP_Btn.anchor.setTo(0.5,0.5);*/ if (this.game.sound.usingWebAudio && this.game.sound.context.state === 'suspended' && !MuteBool) { this.game.input.onTap.addOnce(game.sound.context.resume, game.sound.context); } //add the Play Button sprite Play_Btn = this.add.button(751,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); Logo = this.add.button(266,468,"logo_small",function() { window.open(urlLink, "_blank"); },this,1,0,2); Logo.anchor.setTo(0.5,0.5); Credits_Btn = this.add.button(48,44,"settings_btn",function() { Credits_Btn.visible = false; Credits_Group.visible = true; Play_Btn.inputEnabled = false; },this);//,1,0,2); Credits_Btn.anchor.setTo(0.5,0.5); //---------------------------------------------------------// //Credits Screen Credits_Text = this.add.sprite(CenterX,CenterY,"credits_text"); Credits_Text.anchor.setTo(0.5,0.5); Fb_Btn = this.add.button(716,121,"fb_btn",function() { window.open("https://www.facebook.com/kawaiigames.net/","_blank"); },this); Fb_Btn.anchor.setTo(0.5,0.5); Twitter_Btn = this.add.button(694,200,"twitter_btn",function() { window.open("https://twitter.com/kawaii_games","_blank"); },this); Twitter_Btn.anchor.setTo(0.5,0.5); Deviant_Btn = this.add.button(735,279,"deviant_btn",function() { window.open("http://heglys.deviantart.com/","_blank"); },this); Deviant_Btn.anchor.setTo(0.5,0.5); Insta_Btn = this.add.button(720,358,"insta_btn",function() { window.open("https://www.instagram.com/kawaiigames_net/","_blank"); },this); Insta_Btn.anchor.setTo(0.5,0.5); Patreon_Btn = this.add.button(737,438,"patreon_btn",function() { window.open("https://www.patreon.com/kawaiigames","_blank"); },this); Patreon_Btn.anchor.setTo(0.5,0.5); Links_Group = this.add.group(); Links_Group.add(Fb_Btn); Links_Group.add(Twitter_Btn); Links_Group.add(Deviant_Btn); Links_Group.add(Insta_Btn); Links_Group.add(Patreon_Btn); Links_Group.y = -15; Close_Btn = this.add.button(916,51,"close_btn",function() { Credits_Group.visible = false; Credits_Btn.visible = true; Play_Btn.inputEnabled = true; },this,1,0,2); Close_Btn.anchor.setTo(0.5,0.5); Credits_Logo = this.add.button(729,505,"logo_small",function() { window.open(urlLink, "_blank"); },this,1,0,2); Credits_Logo.anchor.setTo(0.5,0.5); Credits_Logo.scale.setTo(0.7,0.7); Credits_Group = this.add.group(); Credits_Group.add(Credits_Text); Credits_Group.add(Links_Group); Credits_Group.add(Credits_Logo); Credits_Group.add(Close_Btn); Credits_Group.visible = false; //sound button SoundBtn = this.add.button(251,90,"sound_btn", function() { if(!MuteBool) //mute { SoundBtn.frame = 1; this.sound.mute = true; BgMusic.volume = 1; MuteBool = true; } else if(MuteBool) //unmute { SoundBtn.frame = 0; this.sound.mute = false; BgMusic.volume = 0; MuteBool = false; } },this); SoundBtn.anchor.setTo(0.5,0.5); SoundBtn.frame = 0; Credits_Group.add(SoundBtn); PosTextBool = false; /*PosTextBool = true; PosText = this.add.text(870,110,"Hello",{font:"40px Arial",fill:"#ffffff"}); PosText.anchor.setTo(0.5,0.5); PosText.setShadow(3,3,"rgba(0,0,0,0.5)",2); debug_fnc(PosText);*/ }, update: function() { //this.sound.mute = true; //this.state.start("DressUp"); }, } function debug_fnc(Obj,objAlpha,objVisible,objFrame) { /*this.input.onDown.add(function() { Obj.animations.play("Tool8Anim"); },this);*/ if(objAlpha > 0){Obj.alpha = objAlpha;} if(objVisible){Obj.visible = objVisible;} Obj.frame = objFrame; Obj.inputEnabled = true; Obj.input.enableDrag(false); Obj.events.onInputUp.add(function() { if(PosTextBool){PosText.text = Obj.x + "\n" + Obj.y;} else{console.log(Obj.x + "\n" + Obj.y);} },this); }