OwlCyberSecurity - MANAGER
Edit File: dressup.js
var dressup = function(game) { } dressup.prototype = { create: function() { CenterX = this.world.centerX; CenterY = this.world.centerY; hairColor = 10; hlColor = 0; lipsColor = 6; bodyColor = 0; hlVisible = false; colorPage = 1; openedMenu = 1; openedMenuPage = 1; //this.game.renderer.renderSession.roundPixels = true; BG = this.add.sprite(0,0,"background"); /*Intro_Character = this.add.sprite(246,322,"intro_character"); Intro_Character.anchor.setTo(0.5,0.5);*/ Body = this.add.sprite(275,398,"body"); Body.anchor.setTo(0.5,0.5); Body.tint = BodyColor[3]; Body_Outline = this.add.sprite(275,398,"body_outline"); Body_Outline.anchor.setTo(0.5,0.5); Bra = this.add.sprite(242,255,"bra"); Bra.anchor.setTo(0.5,0.5); Bra.visible = false; Head = this.add.sprite(250,143,"head"); Head.anchor.setTo(0.5,0.5); Head.tint = BodyColor[3]; Head_Outline = this.add.sprite(250,144,"head_outline"); Head_Outline.anchor.setTo(0.5,0.5); Panties = this.add.sprite(233,347,"panties"); Panties.anchor.setTo(0.5,0.5); Panties.visible = false; SocksX = [247]; SocksY = [464]; Socks = this.add.sprite(SocksX[0],SocksY[0],"socks"); Socks.anchor.setTo(0.5,0.5); Socks.frame = 5; Socks.tint = Colors[0]; Socks.visible = false; Socks_Outline = this.add.sprite(Socks.x,Socks.y,"socks_outline"); Socks_Outline.anchor.setTo(0.5,0.5); Socks_Outline.frame = Socks.frame; Socks_Outline.visible = false; BottomsX = [243]; BottomsY = [430]; Bottoms = this.add.sprite(BottomsX[0],BottomsY[0],"bottoms"); Bottoms.anchor.setTo(0.5,0.5); Bottoms.tint = 0x404040; Bottoms.frame = 5; Bottoms_Outline = this.add.sprite(Bottoms.x,Bottoms.y,"bottoms_outline"); Bottoms_Outline.anchor.setTo(0.5,0.5); Bottoms_Outline.frame = Bottoms.frame; Bottoms_Outline.smoothed = false; TopsX = [272]; TopsY = [383]; DressX = [272]; DressY = [383]; Clothes = this.add.sprite(TopsX[0],TopsY[0],"tops"); Clothes.anchor.setTo(0.5,0.5); Clothes.name = "Tops"; Clothes.tint = 0x404040; Clothes.frame = 5; Clothes_Outline = this.add.sprite(Clothes.x,Clothes.y,"tops_outline"); Clothes_Outline.anchor.setTo(0.5,0.5); Clothes_Outline.name = "Tops"; Clothes_Outline.frame = Clothes.frame; Eye_Shadow = this.add.sprite(249,138,"eye_shadow"); Eye_Shadow.anchor.setTo(0.5,0.5); Eye_Shadow.visible = false; /*Eyes_White = this.add.sprite(231,147,"eyes_white"); Eyes_White.anchor.setTo(0.5,0.5); Eyes_White.visible = false;*/ EyebrowX = [251,249,251]; EyebrowY = [133,129,134]; Eyebrows = this.add.sprite(EyebrowX[0],EyebrowY[0],"eyebrows"); Eyebrows.anchor.setTo(0.5,0.5); Eyebrows.frame = 0; Eyes = this.add.sprite(250,144,"eyes"); Eyes.anchor.setTo(0.5,0.5); Eyes.tint = Colors[10]; Face_Details = this.add.sprite(249,144,"face_details"); Face_Details.anchor.setTo(0.5,0.5); LipsX = [250]; LipsY = [183]; Lips = this.add.sprite(LipsX[0],LipsY[0],"lips"); Lips.anchor.setTo(0.5,0.5); Lips.frame = 0; Lips.tint = Colors[8]; Lips_Outline = this.add.sprite(Lips.x,Lips.y,"lips_outline"); Lips_Outline.anchor.setTo(0.5,0.5); Lips_Outline.frame = Lips.frame; /*TeethX3 = 467; TeethY3 = 194; TeethX4 = 460; TeethY4 = 188; TeethX5 = 473; TeethY5 = 194; Teeth = this.add.sprite(TeethX3,TeethY3,"teeth"); Teeth.anchor.setTo(0.5,0.5); Teeth.frame = 0; Teeth.visible = false;*/ HairX = [248,250,250,250,249,250]; HairY = [203,201,201,207,199.2,201]; Hair = this.add.sprite(HairX[4],HairY[4],"hair"); Hair.anchor.setTo(0.5,0.5); Hair.frame = 4; Hair.tint = Colors[10]; Hair_Outline = this.add.sprite(Hair.x,Hair.y,"hair_outline"); Hair_Outline.anchor.setTo(0.5,0.5); Hair_Outline.frame = Hair.frame; Hair_HlX = [250,250,250,250,249,250]; Hair_HlY = [195,195,195,200,194,195]; Hair_Hl = this.add.sprite(Hair_HlX[4],Hair_HlY[4],"hair_hl"); Hair_Hl.anchor.setTo(0.5,0.5); Hair_Hl.frame = Hair.frame; Hair_Hl.visible = false; BangsX = [247]; BangsY = [162]; Bangs = this.add.sprite(BangsX[0],BangsY[0],"bangs"); Bangs.anchor.setTo(0.5,0.5); Bangs.frame = 4; Bangs.tint = Colors[10]; Bangs_Outline = this.add.sprite(Bangs.x,Bangs.y + 1,"bangs_outline"); Bangs_Outline.anchor.setTo(0.5,0.5); Bangs_Outline.frame = Bangs.frame; Bang_HlX = [247]; Bang_HlY = [162]; Bang_Hl = this.add.sprite(Bang_HlX[0],Bang_HlY[0],"bang_hl"); Bang_Hl.anchor.setTo(0.5,0.5); Bang_Hl.frame = Bangs.frame; Bang_Hl.visible = false; Extra = this.add.sprite(230,313,"extras"); Extra.anchor.setTo(0.5,0.5); Extra.visible = false; Extra_Outline = this.add.sprite(230,301,"extras_outline"); Extra_Outline.anchor.setTo(0.5,0.5); Extra_Outline.visible = false; Extra2 = this.add.sprite(251,95,"extras2"); Extra2.anchor.setTo(0.5,0.5); Extra2.tint = 0x000000; Extra2.visible = false; Extra2_Outline = this.add.sprite(251,149,"extras2_outline"); Extra2_Outline.anchor.setTo(0.5,0.5); Extra2_Outline.visible = false; Extra3 = this.add.sprite(233,255,"extras3"); Extra3.anchor.setTo(0.5,0.5); Extra3.tint = 0x000000; Extra3.visible = false; Extra3_Outline = this.add.sprite(Extra3.x,Extra3.y,"extras3_outline"); Extra3_Outline.anchor.setTo(0.5,0.5); Extra3_Outline.visible = false; Extra4 = this.add.sprite(241,102,"extras4"); Extra4.anchor.setTo(0.5,0.5); Extra4.visible = false; Extra4_Outline = this.add.sprite(Extra4.x,Extra4.y,"extras4_outline"); Extra4_Outline.anchor.setTo(0.5,0.5); Extra4_Outline.visible = false; Extra5 = this.add.sprite(276,115,"extras5"); Extra5.anchor.setTo(0.5,0.5); Extra5.visible = false; Extra5_Outline = this.add.sprite(Extra5.x,Extra5.y,"extras5_outline"); Extra5_Outline.anchor.setTo(0.5,0.5); Extra5_Outline.visible = false; Extra6 = this.add.sprite(260,84,"extras6"); Extra6.anchor.setTo(0.5,0.5); //Extra6.visible = false; Extra6_Outline = this.add.sprite(Extra6.x,Extra6.y,"extras6_outline"); Extra6_Outline.anchor.setTo(0.5,0.5); //Extra6_Outline.visible = false; ShoesX = [245]; ShoesY = [543]; Shoes = this.add.sprite(ShoesX[0],ShoesY[0],"shoes"); Shoes.anchor.setTo(0.5,0.5); Shoes.frame = 2; Shoes.tint = 0x404040; Shoes_Outline = this.add.sprite(ShoesX[0],ShoesY[0],"shoes_outline"); Shoes_Outline.anchor.setTo(0.5,0.5); Shoes_Outline.frame = Shoes.frame; Shadow = this.add.sprite(247,606,"shadow"); Shadow.anchor.setTo(0.5,0.5); CakeX = [386,386,372,373,385,390]; CakeY = [217,232,234,235,226,191]; Cake = this.add.sprite(CakeX[0],CakeY[0],"cake"); Cake.anchor.setTo(0.5,0.5); Cake.frame = 0; Cake.tint = Colors[11]; Cake_Outline = this.add.sprite(Cake.x,Cake.y,"cake_outline"); Cake_Outline.anchor.setTo(0.5,0.5); Cake_Outline.frame = Cake.frame; Tray = this.add.sprite(372,227,"tray"); Tray.anchor.setTo(0.5,0.5); Doll_Group = this.add.group(); this.SortMainGroup_fnc(); Doll_Group.setAll("smoothed",false); //Doll_Group.scale.setTo(0.5,0.5); Doll_Group.x = 0; Doll_Group.y = 1; //dressup Border = this.add.sprite(713,283,"border"); Border.anchor.setTo(0.5,0.5); //Hair_Menu Bang01_Icon = this.add.button(Border.x + 1,130,"bang_icon",function() { //this.Bang_fnc("bangs","Bang01",BangsX,BangsY); Bangs.frame = 0; Bangs.x = BangsX[0]; Bangs.y = BangsY[0]; Bangs_Outline.frame = Bangs.frame; Bangs_Outline.x = Bangs.x; Bangs_Outline.y = Bangs.y + 1; Bang_Hl.frame = Bangs.frame; this.checkBangsColor(); },this,1,0,0); Bang01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang01_Icon); this.buttonDown_fnc(Bang01_Icon);}; Bang02_Icon = this.add.button(Border.x + 1,Bang01_Icon.y + Bang01_Icon.height + 10,"bang_icon2",function() { //this.Bang_fnc("bangs2","Bang02",BangsX2,BangsY2); Bangs.frame = 1; Bangs.x = BangsX[0]; Bangs.y = BangsY[0]; Bangs_Outline.frame = Bangs.frame; Bangs_Outline.x = Bangs.x; Bangs_Outline.y = Bangs.y + 1; Bang_Hl.frame = Bangs.frame; this.checkBangsColor(); },this,1,0,0); Bang02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang02_Icon); this.buttonDown_fnc(Bang02_Icon);}; Bang03_Icon = this.add.button(Border.x + 1,Bang02_Icon.y + Bang02_Icon.height + 10,"bang_icon3",function() { //this.Bang_fnc("bangs3","Bang03",BangsX3,BangsY3); Bangs.frame = 2; Bangs.x = BangsX[0]; Bangs.y = BangsY[0]; Bangs_Outline.frame = Bangs.frame; Bangs_Outline.x = Bangs.x; Bangs_Outline.y = Bangs.y + 1; Bang_Hl.frame = Bangs.frame; this.checkBangsColor(); },this,1,0,0); Bang03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang03_Icon); this.buttonDown_fnc(Bang03_Icon);}; Bang04_Icon = this.add.button(Border.x + 1,Bang01_Icon.y,"bang_icon4",function() { //this.Bang_fnc("bangs4","Bang04",BangsX4,BangsY4); Bangs.frame = 3; Bangs.x = BangsX[0]; Bangs.y = BangsY[0]; Bangs_Outline.frame = Bangs.frame; Bangs_Outline.x = Bangs.x; Bangs_Outline.y = Bangs.y + 1; Bang_Hl.frame = Bangs.frame; this.checkBangsColor(); },this,1,0,0); Bang04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang04_Icon); this.buttonDown_fnc(Bang04_Icon);}; Bang04_Icon.visible = false; Bang05_Icon = this.add.button(Border.x + 1,Bang04_Icon.y + Bang04_Icon.height + 10,"bang_icon5",function() { //this.Bang_fnc("bangs5","Bang05",BangsX5,BangsY5); Bangs.frame = 4; Bangs.x = BangsX[0]; Bangs.y = BangsY[0]; Bangs_Outline.frame = Bangs.frame; Bangs_Outline.x = Bangs.x; Bangs_Outline.y = Bangs.y + 1; Bang_Hl.frame = Bangs.frame; this.checkBangsColor(); },this,1,0,0); Bang05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang05_Icon); this.buttonDown_fnc(Bang05_Icon);}; Bang05_Icon.visible = false; Bang06_Icon = this.add.button(Border.x + 1,Bang05_Icon.y + Bang05_Icon.height + 9.2,"bang_icon6",function() { //this.Bang_fnc("bangs6","Bang06",BangsX6,BangsY6); Bangs.frame = 5; Bangs.x = BangsX[0]; Bangs.y = BangsY[0]; Bangs_Outline.frame = Bangs.frame; Bangs_Outline.x = Bangs.x; Bangs_Outline.y = Bangs.y + 1; Bang_Hl.frame = Bangs.frame; this.checkBangsColor(); },this,1,0,0); Bang06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang06_Icon); this.buttonDown_fnc(Bang06_Icon);}; Bang06_Icon.visible = false; Hair01_Icon = this.add.button(Border.x + 1,130,"hair01_icon",function() { //this.Hair_fnc("hair","Hair01",HairX,HairY); Hair.frame = 0; Hair.x = HairX[0]; Hair.y = HairY[0]; Hair_Outline.frame = Hair.frame; Hair_Outline.x = Hair.x; Hair_Outline.y = Hair.y; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair.frame]; Hair_Hl.y = Hair_HlY[Hair.frame]; this.checkHairColor(); },this,1,0,0); Hair01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair01_Icon); this.buttonDown_fnc(Hair01_Icon);}; Hair01_Icon.visible = false; Hair02_Icon = this.add.button(Border.x + 1,Hair01_Icon.y + Hair01_Icon.height + 10,"hair02_icon",function() { //this.Hair_fnc("hair2","Hair02",HairX2,HairY2); Hair.frame = 1; Hair.x = HairX[1]; Hair.y = HairY[1]; Hair_Outline.frame = Hair.frame; Hair_Outline.x = Hair.x; Hair_Outline.y = Hair.y; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair.frame]; Hair_Hl.y = Hair_HlY[Hair.frame]; this.checkHairColor(); },this,1,0,0); Hair02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair02_Icon); this.buttonDown_fnc(Hair02_Icon);}; Hair02_Icon.visible = false; Hair03_Icon = this.add.button(Border.x + 1,Hair02_Icon.y + Hair02_Icon.height + 10,"hair03_icon",function() { //this.Hair_fnc("hair3","Hair03",HairX3,HairY3); Hair.frame = 2; Hair.x = HairX[2]; Hair.y = HairY[2]; Hair_Outline.frame = Hair.frame; Hair_Outline.x = Hair.x; Hair_Outline.y = Hair.y; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair.frame]; Hair_Hl.y = Hair_HlY[Hair.frame]; this.checkHairColor(); },this,1,0,0); Hair03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair03_Icon); this.buttonDown_fnc(Hair03_Icon);}; Hair03_Icon.visible = false; Hair04_Icon = this.add.button(Border.x + 1,129,"hair04_icon",function() { //this.Hair_fnc("hair4","Hair04",HairX4,HairY4); Hair.frame = 3; Hair.x = HairX[3]; Hair.y = HairY[3]; Hair_Outline.frame = Hair.frame; Hair_Outline.x = Hair.x; Hair_Outline.y = Hair.y; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair.frame]; Hair_Hl.y = Hair_HlY[Hair.frame]; this.checkHairColor(); },this,1,0,0); Hair04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair04_Icon); this.buttonDown_fnc(Hair04_Icon);}; Hair04_Icon.visible = false; Hair05_Icon = this.add.button(Border.x + 1,Hair04_Icon.y + Hair04_Icon.height + 10,"hair05_icon",function() { //this.Hair_fnc("hair5","Hair05",HairX5,HairY5); Hair.frame = 4; Hair.x = HairX[4]; Hair.y = HairY[4]; Hair_Outline.frame = Hair.frame; Hair_Outline.x = Hair.x; Hair_Outline.y = Hair.y; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair.frame]; Hair_Hl.y = Hair_HlY[Hair.frame]; this.checkHairColor(); },this,1,0,0); Hair05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair05_Icon); this.buttonDown_fnc(Hair05_Icon);}; Hair05_Icon.visible = false; Hair06_Icon = this.add.button(Border.x + 1,Hair05_Icon.y + Hair05_Icon.height + 11,"hair06_icon",function() { //this.Hair_fnc("hair6","Hair06",HairX6,HairY6); Hair.frame = 5; Hair.x = HairX[5]; Hair.y = HairY[5]; Hair_Outline.frame = Hair.frame; Hair_Outline.x = Hair.x; Hair_Outline.y = Hair.y; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair.frame]; Hair_Hl.y = Hair_HlY[Hair.frame]; this.checkHairColor(); },this,1,0,0); Hair06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair06_Icon); this.buttonDown_fnc(Hair06_Icon);}; Hair06_Icon.visible = false; Hair_Menu_Group = this.add.group(); Hair_Menu_Group.add(Bang01_Icon); Hair_Menu_Group.add(Bang02_Icon); Hair_Menu_Group.add(Bang03_Icon); Hair_Menu_Group.add(Bang04_Icon); Hair_Menu_Group.add(Bang05_Icon); Hair_Menu_Group.add(Bang06_Icon); Hair_Menu_Group.add(Hair01_Icon); Hair_Menu_Group.add(Hair02_Icon); Hair_Menu_Group.add(Hair03_Icon); Hair_Menu_Group.add(Hair04_Icon); Hair_Menu_Group.add(Hair05_Icon); Hair_Menu_Group.add(Hair06_Icon); Hair_Menu_Group.setAll("input.pixelPerfectClick",true); Hair_Menu_Group.setAll("input.pixelPerfectOver",true); //Color_Icon Color_Pallette = this.add.sprite(714,255,"color_pallette"); Color_Pallette.anchor.setTo(0.5,0.5); Color_Pallette2 = this.add.sprite(714,255,"color_pallette2"); Color_Pallette2.anchor.setTo(0.5,0.5); Color_Pallette2.visible = false; Color01_Icon = this.add.button(615,83,"color_icon_btn",function() { this.changeColor(0,40); },this); Color01_Icon.anchor.setTo(0.5,0.5); Color01_Icon.alpha = 0; Color02_Icon = this.add.button(Color01_Icon.x + Color01_Icon.width + 2,Color01_Icon.y,"color_icon_btn",function() { this.changeColor(1,41); },this,1,0,0); Color02_Icon.anchor.setTo(0.5,0.5); Color02_Icon.alpha = 0; Color03_Icon = this.add.button(Color02_Icon.x + Color02_Icon.width + 2,Color02_Icon.y,"color_icon_btn",function() { this.changeColor(2,42); },this,1,0,0); Color03_Icon.anchor.setTo(0.5,0.5); Color03_Icon.alpha = 0; Color04_Icon = this.add.button(Color03_Icon.x + Color03_Icon.width + 5,Color03_Icon.y,"color_icon_btn",function() { this.changeColor(3,43); },this,1,0,0); Color04_Icon.anchor.setTo(0.5,0.5); Color04_Icon.alpha = 0; Color05_Icon = this.add.button(Color04_Icon.x + Color04_Icon.width + 3,Color04_Icon.y + 2,"color_icon_btn",function() { this.changeColor(4,44); },this,1,0,0); Color05_Icon.anchor.setTo(0.5,0.5); Color05_Icon.alpha = 0; Color06_Icon = this.add.button(Color01_Icon.x,Color01_Icon.y + Color01_Icon.height + 2,"color_icon_btn",function() { this.changeColor(5,45); },this,1,0,0); Color06_Icon.anchor.setTo(0.5,0.5); Color06_Icon.alpha = 0; Color07_Icon = this.add.button(Color02_Icon.x,Color02_Icon.y + Color02_Icon.height + 2,"color_icon_btn",function() { this.changeColor(6,46); },this,1,0,0); Color07_Icon.anchor.setTo(0.5,0.5); Color07_Icon.alpha = 0; Color08_Icon = this.add.button(Color03_Icon.x + 2,Color03_Icon.y + Color03_Icon.height + 2,"color_icon_btn",function() { this.changeColor(7,47); },this,1,0,0); Color08_Icon.anchor.setTo(0.5,0.5); Color08_Icon.alpha = 0; Color09_Icon = this.add.button(Color04_Icon.x,Color04_Icon.y + Color04_Icon.height + 2,"color_icon_btn",function() { this.changeColor(8,48); },this,1,0,0); Color09_Icon.anchor.setTo(0.5,0.5); Color09_Icon.alpha = 0; Color10_Icon = this.add.button(Color05_Icon.x,Color05_Icon.y + Color05_Icon.height + 1,"color_icon_btn",function() { this.changeColor(9,49); },this,1,0,0); Color10_Icon.anchor.setTo(0.5,0.5); Color10_Icon.alpha = 0; Color11_Icon = this.add.button(Color06_Icon.x,Color06_Icon.y + Color06_Icon.height + 2,"color_icon_btn",function() { this.changeColor(10,50); },this,1,0,0); Color11_Icon.anchor.setTo(0.5,0.5); Color11_Icon.alpha = 0; Color12_Icon = this.add.button(Color07_Icon.x,Color07_Icon.y + Color07_Icon.height + 2,"color_icon_btn",function() { this.changeColor(11,51); },this); Color12_Icon.anchor.setTo(0.5,0.5); Color12_Icon.alpha = 0; Color13_Icon = this.add.button(Color08_Icon.x,Color08_Icon.y + Color08_Icon.height + 2,"color_icon_btn",function() { this.changeColor(12,52); },this); Color13_Icon.anchor.setTo(0.5,0.5); Color13_Icon.alpha = 0; Color14_Icon = this.add.button(Color09_Icon.x,Color09_Icon.y + Color09_Icon.height + 2,"color_icon_btn",function() { this.changeColor(13,53); },this); Color14_Icon.anchor.setTo(0.5,0.5); Color14_Icon.alpha = 0; Color15_Icon = this.add.button(Color10_Icon.x,Color10_Icon.y + Color10_Icon.height + 1,"color_icon_btn",function() { this.changeColor(14,54); },this); Color15_Icon.anchor.setTo(0.5,0.5); Color15_Icon.alpha = 0; Color16_Icon = this.add.button(Color11_Icon.x,Color11_Icon.y + Color11_Icon.height + 2,"color_icon_btn",function() { this.changeColor(15,55); },this); Color16_Icon.anchor.setTo(0.5,0.5); Color16_Icon.alpha = 0; Color17_Icon = this.add.button(Color12_Icon.x,Color12_Icon.y + Color12_Icon.height + 2,"color_icon_btn",function() { this.changeColor(16,56); },this); Color17_Icon.anchor.setTo(0.5,0.5); Color17_Icon.alpha = 0; Color18_Icon = this.add.button(Color13_Icon.x,Color13_Icon.y + Color13_Icon.height + 1,"color_icon_btn",function() { this.changeColor(17,57); },this); Color18_Icon.anchor.setTo(0.5,0.5); Color18_Icon.alpha = 0; Color19_Icon = this.add.button(Color14_Icon.x,Color14_Icon.y + Color14_Icon.height + 1,"color_icon_btn",function() { this.changeColor(18,58); },this); Color19_Icon.anchor.setTo(0.5,0.5); Color19_Icon.alpha = 0; Color20_Icon = this.add.button(Color15_Icon.x,Color15_Icon.y + Color15_Icon.height + 1,"color_icon_btn",function() { this.changeColor(19,59); },this); Color20_Icon.anchor.setTo(0.5,0.5); Color20_Icon.alpha = 0; Color21_Icon = this.add.button(Color16_Icon.x,Color16_Icon.y + Color16_Icon.height + 2,"color_icon_btn",function() { this.changeColor(20,60); },this); Color21_Icon.anchor.setTo(0.5,0.5); Color21_Icon.alpha = 0; Color22_Icon = this.add.button(Color17_Icon.x,Color17_Icon.y + Color17_Icon.height + 2,"color_icon_btn",function() { this.changeColor(21,61); },this); Color22_Icon.anchor.setTo(0.5,0.5); Color22_Icon.alpha = 0; Color23_Icon = this.add.button(Color18_Icon.x,Color18_Icon.y + Color18_Icon.height + 2,"color_icon_btn",function() { this.changeColor(22,62); },this); Color23_Icon.anchor.setTo(0.5,0.5); Color23_Icon.alpha = 0; Color24_Icon = this.add.button(Color19_Icon.x,Color19_Icon.y + Color19_Icon.height + 2,"color_icon_btn",function() { this.changeColor(23,63); },this); Color24_Icon.anchor.setTo(0.5,0.5); Color24_Icon.alpha = 0; Color25_Icon = this.add.button(Color20_Icon.x,Color20_Icon.y + Color20_Icon.height + 1,"color_icon_btn",function() { this.changeColor(24,64); },this); Color25_Icon.anchor.setTo(0.5,0.5); Color25_Icon.alpha = 0; Color26_Icon = this.add.button(Color21_Icon.x,Color21_Icon.y + Color21_Icon.height + 1,"color_icon_btn",function() { this.changeColor(25,65); },this); Color26_Icon.anchor.setTo(0.5,0.5); Color26_Icon.alpha = 0; Color27_Icon = this.add.button(Color22_Icon.x,Color22_Icon.y + Color22_Icon.height + 1,"color_icon_btn",function() { this.changeColor(26,66); },this); Color27_Icon.anchor.setTo(0.5,0.5); Color27_Icon.alpha = 0; Color28_Icon = this.add.button(Color23_Icon.x,Color23_Icon.y + Color23_Icon.height + 1,"color_icon_btn",function() { this.changeColor(27,67); },this); Color28_Icon.anchor.setTo(0.5,0.5); Color28_Icon.alpha = 0; Color29_Icon = this.add.button(Color24_Icon.x,Color24_Icon.y + Color24_Icon.height + 1,"color_icon_btn",function() { this.changeColor(28,68); },this); Color29_Icon.anchor.setTo(0.5,0.5); Color29_Icon.alpha = 0; Color30_Icon = this.add.button(Color25_Icon.x,Color25_Icon.y + Color25_Icon.height + 1,"color_icon_btn",function() { this.changeColor(29,69); },this); Color30_Icon.anchor.setTo(0.5,0.5); Color30_Icon.alpha = 0; Color31_Icon = this.add.button(Color26_Icon.x,Color26_Icon.y + Color26_Icon.height + 1,"color_icon_btn",function() { this.changeColor(30,70); },this); Color31_Icon.anchor.setTo(0.5,0.5); Color31_Icon.alpha = 0; Color32_Icon = this.add.button(Color27_Icon.x,Color27_Icon.y + Color27_Icon.height + 1,"color_icon_btn",function() { this.changeColor(31,71); },this); Color32_Icon.anchor.setTo(0.5,0.5); Color32_Icon.alpha = 0; Color33_Icon = this.add.button(Color28_Icon.x,Color28_Icon.y + Color28_Icon.height + 1,"color_icon_btn",function() { this.changeColor(32,72); },this); Color33_Icon.anchor.setTo(0.5,0.5); Color33_Icon.alpha = 0; Color34_Icon = this.add.button(Color29_Icon.x,Color29_Icon.y + Color29_Icon.height + 1,"color_icon_btn",function() { this.changeColor(33,73); },this); Color34_Icon.anchor.setTo(0.5,0.5); Color34_Icon.alpha = 0; Color35_Icon = this.add.button(Color30_Icon.x,Color30_Icon.y + Color30_Icon.height + 1,"color_icon_btn",function() { this.changeColor(34,74); },this); Color35_Icon.anchor.setTo(0.5,0.5); Color35_Icon.alpha = 0; Color36_Icon = this.add.button(Color31_Icon.x,Color31_Icon.y + Color31_Icon.height + 1,"color_icon_btn",function() { this.changeColor(35,75); },this); Color36_Icon.anchor.setTo(0.5,0.5); Color36_Icon.alpha = 0; Color37_Icon = this.add.button(Color32_Icon.x,Color32_Icon.y + Color32_Icon.height + 1,"color_icon_btn",function() { this.changeColor(36,76); },this); Color37_Icon.anchor.setTo(0.5,0.5); Color37_Icon.alpha = 0; Color38_Icon = this.add.button(Color33_Icon.x,Color33_Icon.y + Color33_Icon.height + 1,"color_icon_btn",function() { this.changeColor(37,77); },this); Color38_Icon.anchor.setTo(0.5,0.5); Color38_Icon.alpha = 0; Color39_Icon = this.add.button(Color34_Icon.x,Color34_Icon.y + Color34_Icon.height + 1,"color_icon_btn",function() { this.changeColor(38,78); },this); Color39_Icon.anchor.setTo(0.5,0.5); Color39_Icon.alpha = 0; Color40_Icon = this.add.button(Color35_Icon.x,Color35_Icon.y + Color35_Icon.height + 1,"color_icon_btn",function() { this.changeColor(39,79); },this); Color40_Icon.anchor.setTo(0.5,0.5); Color40_Icon.alpha = 0; //Eyebrows_Icon Eyebrows_Icon = this.add.button(Border.x - 1, 131, "eyebrows_icon",function() { Eyebrows.frame = 0; Eyebrows.x = EyebrowX[0]; Eyebrows.y = EyebrowY[0]; },this,1,0,0); Eyebrows_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyebrows_Icon); this.buttonDown_fnc(Eyebrows_Icon);}; Eyebrows_Icon2 = this.add.button(Border.x - 1, Eyebrows_Icon.y + Eyebrows_Icon.height + 10, "eyebrows_icon2",function() { Eyebrows.frame = 1; Eyebrows.x = EyebrowX[1]; Eyebrows.y = EyebrowY[1]; },this,1,0,0); Eyebrows_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyebrows_Icon2); this.buttonDown_fnc(Eyebrows_Icon2);}; Eyebrows_Icon3 = this.add.button(Border.x - 1, Eyebrows_Icon2.y + Eyebrows_Icon2.height + 10, "eyebrows_icon3",function() { Eyebrows.frame = 2; Eyebrows.x = EyebrowX[2]; Eyebrows.y = EyebrowY[2]; },this,1,0,0); Eyebrows_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyebrows_Icon3); this.buttonDown_fnc(Eyebrows_Icon3);}; Eyebrows_Menu_Group = this.add.group(); Eyebrows_Menu_Group.add(Eyebrows_Icon); Eyebrows_Menu_Group.add(Eyebrows_Icon2); Eyebrows_Menu_Group.add(Eyebrows_Icon3); Eyebrows_Menu_Group.visible = false; //Lips_Icon Lips01_Icon = this.add.button(Border.x + 1,130,"lips01_icon",function() { Lips.frame = 0; Lips.x = LipsX[0]; Lips.y = LipsY[0]; Lips_Outline.frame = Lips.frame; Lips_Outline.x = Lips.x; Lips_Outline.y = Lips.y; },this,1,0,0); Lips01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips01_Icon); this.buttonDown_fnc(Lips01_Icon);}; Lips02_Icon = this.add.button(Border.x + 1,Lips01_Icon.y + Lips01_Icon.height + 10,"lips02_icon",function() { Lips.frame = 1; Lips.x = LipsX[0]; Lips.y = LipsY[0]; Lips_Outline.frame = Lips.frame; Lips_Outline.x = Lips.x; Lips_Outline.y = Lips.y; },this,1,0,0); Lips02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips02_Icon); this.buttonDown_fnc(Lips02_Icon);}; Lips03_Icon = this.add.button(Border.x + 1,Lips02_Icon.y + Lips02_Icon.height + 10,"lips03_icon",function() { Lips.frame = 2; Lips.x = LipsX[0]; Lips.y = LipsY[0]; Lips_Outline.frame = Lips.frame; Lips_Outline.x = Lips.x; Lips_Outline.y = Lips.y; },this,1,0,0); Lips03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips03_Icon); this.buttonDown_fnc(Lips03_Icon);}; Lips04_Icon = this.add.button(Border.x + 1,130,"lips04_icon",function() { Lips.frame = 3; Lips.x = LipsX[0]; Lips.y = LipsY[0]; Lips_Outline.frame = Lips.frame; Lips_Outline.x = Lips.x; Lips_Outline.y = Lips.y; },this,1,0,0); Lips04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips04_Icon); this.buttonDown_fnc(Lips04_Icon);}; Lips04_Icon.visible = false; Lips05_Icon = this.add.button(Border.x + 1,Lips04_Icon.y + Lips04_Icon.height + 11,"lips05_icon",function() { Lips.frame = 4; Lips.x = LipsX[0]; Lips.y = LipsY[0]; Lips_Outline.frame = Lips.frame; Lips_Outline.x = Lips.x; Lips_Outline.y = Lips.y; },this,1,0,0); Lips05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips05_Icon); this.buttonDown_fnc(Lips05_Icon);}; Lips05_Icon.visible = false; Lips06_Icon = this.add.button(Border.x + 1,Lips05_Icon.y + Lips05_Icon.height + 11.5,"lips06_icon",function() { Lips.frame = 5; Lips.x = LipsX[0]; Lips.y = LipsY[0]; Lips_Outline.frame = Lips.frame; Lips_Outline.x = Lips.x; Lips_Outline.y = Lips.y; },this,1,0,0); Lips06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips06_Icon); this.buttonDown_fnc(Lips06_Icon);}; Lips06_Icon.visible = false; Lips_Menu_Group = this.add.group(); Lips_Menu_Group.add(Lips01_Icon); Lips_Menu_Group.add(Lips02_Icon); Lips_Menu_Group.add(Lips03_Icon); Lips_Menu_Group.add(Lips04_Icon); Lips_Menu_Group.add(Lips05_Icon); Lips_Menu_Group.add(Lips06_Icon); Lips_Menu_Group.setAll("input.pixelPerfectClick",true); Lips_Menu_Group.setAll("input.pixelPerfectOver",true); Lips_Menu_Group.visible = false; //SkinColor_Icon SkinColor01_Icon = this.add.button(630.4,98,"skincolor01_icon",function() { bodyColor = 0; Body.tint = BodyColor[0]; Head.tint = BodyColor[0]; },this,1,0,0); SkinColor01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor01_Icon); this.buttonDown_fnc(SkinColor01_Icon);}; SkinColor02_Icon = this.add.button(SkinColor01_Icon.x + SkinColor01_Icon.width + 9,SkinColor01_Icon.y,"skincolor02_icon",function() { bodyColor = 1; Body.tint = BodyColor[1]; Head.tint = BodyColor[1]; },this,1,0,0); SkinColor02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor02_Icon); this.buttonDown_fnc(SkinColor02_Icon);}; SkinColor03_Icon = this.add.button(SkinColor02_Icon.x + SkinColor02_Icon.width + 9,SkinColor02_Icon.y,"skincolor03_icon",function() { bodyColor = 2; Body.tint = BodyColor[2]; Head.tint = BodyColor[2]; },this,1,0,0); SkinColor03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor03_Icon); this.buttonDown_fnc(SkinColor03_Icon);}; SkinColor04_Icon = this.add.button(SkinColor01_Icon.x,SkinColor01_Icon.y + SkinColor01_Icon.height + 5,"skincolor04_icon",function() { bodyColor = 3; Body.tint = BodyColor[3]; Head.tint = BodyColor[3]; },this,1,0,0); SkinColor04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor04_Icon); this.buttonDown_fnc(SkinColor04_Icon);}; SkinColor05_Icon = this.add.button(SkinColor04_Icon.x + SkinColor04_Icon.width + 9,SkinColor04_Icon.y,"skincolor05_icon",function() { bodyColor = 4; Body.tint = BodyColor[4]; Head.tint = BodyColor[4]; },this,1,0,0); SkinColor05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor05_Icon); this.buttonDown_fnc(SkinColor05_Icon);}; SkinColor06_Icon = this.add.button(SkinColor05_Icon.x + SkinColor05_Icon.width + 9,SkinColor05_Icon.y,"skincolor06_icon",function() { bodyColor = 5; Body.tint = BodyColor[5]; Head.tint = BodyColor[5]; },this,1,0,0); SkinColor06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor06_Icon); this.buttonDown_fnc(SkinColor06_Icon);}; SkinColor07_Icon = this.add.button(SkinColor04_Icon.x,SkinColor04_Icon.y + SkinColor04_Icon.height + 5,"skincolor07_icon",function() { bodyColor = 6; Body.tint = BodyColor[6]; Head.tint = BodyColor[6]; },this,1,0,0); SkinColor07_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor07_Icon); this.buttonDown_fnc(SkinColor07_Icon);}; SkinColor08_Icon = this.add.button(SkinColor07_Icon.x + SkinColor07_Icon.width + 9,SkinColor07_Icon.y,"skincolor08_icon",function() { bodyColor = 7; Body.tint = BodyColor[7]; Head.tint = BodyColor[7]; },this,1,0,0); SkinColor08_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor08_Icon); this.buttonDown_fnc(SkinColor08_Icon);}; SkinColor09_Icon = this.add.button(SkinColor08_Icon.x + SkinColor08_Icon.width + 9,SkinColor08_Icon.y,"skincolor09_icon",function() { bodyColor = 8; Body.tint = BodyColor[8]; Head.tint = BodyColor[8]; },this,1,0,0); SkinColor09_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor09_Icon); this.buttonDown_fnc(SkinColor09_Icon);}; SkinColor10_Icon = this.add.button(SkinColor07_Icon.x,SkinColor07_Icon.y + SkinColor07_Icon.height + 5,"skincolor10_icon",function() { bodyColor = 9; Body.tint = BodyColor[9]; Head.tint = BodyColor[9]; },this,1,0,0); SkinColor10_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor10_Icon); this.buttonDown_fnc(SkinColor10_Icon);}; SkinColor11_Icon = this.add.button(SkinColor10_Icon.x + SkinColor10_Icon.width + 9,SkinColor10_Icon.y,"skincolor11_icon",function() { bodyColor = 10; Body.tint = BodyColor[10]; Head.tint = BodyColor[10]; },this,1,0,0); SkinColor11_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor11_Icon); this.buttonDown_fnc(SkinColor11_Icon);}; SkinColor12_Icon = this.add.button(SkinColor11_Icon.x + SkinColor11_Icon.width + 9,SkinColor11_Icon.y,"skincolor12_icon",function() { bodyColor = 11; Body.tint = BodyColor[11]; Head.tint = BodyColor[11]; },this,1,0,0); SkinColor12_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor12_Icon); this.buttonDown_fnc(SkinColor12_Icon);}; SkinColor13_Icon = this.add.button(SkinColor10_Icon.x,SkinColor10_Icon.y + SkinColor10_Icon.height + 5,"skincolor13_icon",function() { bodyColor = 12; Body.tint = BodyColor[12]; Head.tint = BodyColor[12]; },this,1,0,0); SkinColor13_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor13_Icon); this.buttonDown_fnc(SkinColor13_Icon);}; SkinColor14_Icon = this.add.button(SkinColor13_Icon.x + SkinColor13_Icon.width + 9,SkinColor13_Icon.y,"skincolor14_icon",function() { bodyColor = 13; Body.tint = BodyColor[13]; Head.tint = BodyColor[13]; },this,1,0,0); SkinColor14_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor14_Icon); this.buttonDown_fnc(SkinColor14_Icon);}; SkinColor15_Icon = this.add.button(SkinColor14_Icon.x + SkinColor14_Icon.width + 9,SkinColor14_Icon.y,"skincolor15_icon",function() { bodyColor = 14; Body.tint = BodyColor[14]; Head.tint = BodyColor[14]; },this,1,0,0); SkinColor15_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor15_Icon); this.buttonDown_fnc(SkinColor15_Icon);}; SkinColor_Menu_Group = this.add.group(); SkinColor_Menu_Group.add(SkinColor01_Icon); SkinColor_Menu_Group.add(SkinColor02_Icon); SkinColor_Menu_Group.add(SkinColor03_Icon); SkinColor_Menu_Group.add(SkinColor04_Icon); SkinColor_Menu_Group.add(SkinColor05_Icon); SkinColor_Menu_Group.add(SkinColor06_Icon); SkinColor_Menu_Group.add(SkinColor07_Icon); SkinColor_Menu_Group.add(SkinColor08_Icon); SkinColor_Menu_Group.add(SkinColor09_Icon); SkinColor_Menu_Group.add(SkinColor10_Icon); SkinColor_Menu_Group.add(SkinColor11_Icon); SkinColor_Menu_Group.add(SkinColor12_Icon); SkinColor_Menu_Group.add(SkinColor13_Icon); SkinColor_Menu_Group.add(SkinColor14_Icon); SkinColor_Menu_Group.add(SkinColor15_Icon); SkinColor_Menu_Group.visible = false; //Tops_Icon Tops_Icon = this.add.button(Border.x,128,"tops_icon",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 0; Clothes.tint = Colors[4]; Clothes.x = TopsX[0]; Clothes.y = TopsY[0]; Clothes_Outline.frame = Clothes.frame; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; if(Bottoms.visible == false){Panties.visible = true;} },this,1,0,0); Tops_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon); this.buttonDown_fnc(Tops_Icon);}; Tops_Icon2 = this.add.button(Border.x + 3,Tops_Icon.y + Tops_Icon.height + 11,"tops_icon2",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 1; Clothes.tint = Colors[4]; Clothes.x = TopsX[0]; Clothes.y = TopsY[0]; Clothes_Outline.frame = Clothes.frame; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; if(Bottoms.visible == false){Panties.visible = true;} },this,1,0,0); Tops_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon2); this.buttonDown_fnc(Tops_Icon2);}; Tops_Icon3 = this.add.button(Border.x,Tops_Icon2.y + Tops_Icon2.height + 10.7,"tops_icon3",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 2; Clothes.tint = Colors2[11]; Clothes.x = TopsX[0]; Clothes.y = TopsY[0]; Clothes_Outline.frame = Clothes.frame; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; if(Bottoms.visible == false){Panties.visible = true;} },this,1,0,0); Tops_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon3); this.buttonDown_fnc(Tops_Icon3);}; Tops_Icon4 = this.add.button(Border.x,Tops_Icon.y + 1,"tops_icon4",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 3; Clothes.tint = Colors[3]; Clothes.x = TopsX[0]; Clothes.y = TopsY[0]; Clothes_Outline.frame = Clothes.frame; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; if(Bottoms.visible == false){Panties.visible = true;} },this,1,0,0); Tops_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon4); this.buttonDown_fnc(Tops_Icon4);}; Tops_Icon4.visible = false; Tops_Icon5 = this.add.button(Border.x,Tops_Icon4.y + Tops_Icon4.height + 10,"tops_icon5",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 4; Clothes.tint = Colors[36]; Clothes.x = TopsX[0]; Clothes.y = TopsY[0]; Clothes_Outline.frame = Clothes.frame; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; if(Bottoms.visible == false){Panties.visible = true;} },this,1,0,0); Tops_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon5); this.buttonDown_fnc(Tops_Icon5);}; Tops_Icon5.visible = false; Tops_Icon6 = this.add.button(Border.x,Tops_Icon5.y + Tops_Icon5.height + 10,"tops_icon6",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 5; Clothes.tint = Colors[1]; Clothes.x = TopsX[0]; Clothes.y = TopsY[0]; Clothes_Outline.frame = Clothes.frame; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; if(Bottoms.visible == false){Panties.visible = true;} },this,1,0,0); Tops_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon6); this.buttonDown_fnc(Tops_Icon6);}; Tops_Icon6.visible = false; Tops_Menu_Group = this.add.group(); Tops_Menu_Group.add(Tops_Icon); Tops_Menu_Group.add(Tops_Icon2); Tops_Menu_Group.add(Tops_Icon3); Tops_Menu_Group.add(Tops_Icon4); Tops_Menu_Group.add(Tops_Icon5); Tops_Menu_Group.add(Tops_Icon6); Tops_Menu_Group.setAll("input.pixelPerfectClick",true); Tops_Menu_Group.setAll("input.pixelPerfectOver",true); Tops_Menu_Group.visible = false; //Bottoms_Icon Bottoms_Icon = this.add.button(Border.x,129.5,"bottoms_icon",function() { Bottoms.frame = 0; Bottoms_Outline.frame = Bottoms.frame; Bottoms.tint = Colors2[0]; Bottoms.visible = true; Bottoms_Outline.visible = true; /*if(Clothes.frame <= 5) { Bottoms.visible = true; Bottoms_Outline.visible = true; } else { Bottoms.visible = true; Bottoms_Outline.visible = true; }*/ },this,1,0,0); Bottoms_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon); this.buttonDown_fnc(Bottoms_Icon);}; Bottoms_Icon2 = this.add.button(Border.x,Bottoms_Icon.y + Bottoms_Icon.height + 10,"bottoms_icon2",function() { Bottoms.frame = 1; Bottoms_Outline.frame = Bottoms.frame; Bottoms.tint = Colors[35]; Bottoms.visible = true; Bottoms_Outline.visible = true; /*if(Clothes.frame <= 5) { Bottoms.visible = true; Bottoms_Outline.visible = true; } else { Bottoms.visible = false; Bottoms_Outline.visible = false; }*/ },this,1,0,0); Bottoms_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon2); this.buttonDown_fnc(Bottoms_Icon2);}; Bottoms_Icon3 = this.add.button(Border.x,Bottoms_Icon2.y + Bottoms_Icon2.height + 10,"bottoms_icon3",function() { Bottoms.frame = 2; Bottoms_Outline.frame = Bottoms.frame; Bottoms.tint = Colors[1]; Bottoms.visible = true; Bottoms_Outline.visible = true; /*if(Clothes.frame <= 5) { Bottoms.visible = true; Bottoms_Outline.visible = true; } else { Bottoms.visible = false; Bottoms_Outline.visible = false; }*/ },this,1,0,0); Bottoms_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon3); this.buttonDown_fnc(Bottoms_Icon3);}; Bottoms_Icon4 = this.add.button(Border.x,Bottoms_Icon.y,"bottoms_icon4",function() { Bottoms.frame = 3; Bottoms_Outline.frame = Bottoms.frame; Bottoms.tint = Colors[3]; Bottoms.visible = true; Bottoms_Outline.visible = true; /*if(Clothes.frame <= 5) { Bottoms.visible = true; Bottoms_Outline.visible = true; } else { Bottoms.visible = false; Bottoms_Outline.visible = false; }*/ },this,1,0,0); Bottoms_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon4); this.buttonDown_fnc(Bottoms_Icon4);}; Bottoms_Icon4.visible = false; Bottoms_Icon5 = this.add.button(Border.x,Bottoms_Icon4.y + Bottoms_Icon4.height + 10,"bottoms_icon5",function() { Bottoms.frame = 4; Bottoms_Outline.frame = Bottoms.frame; Bottoms.tint = Colors[36]; Bottoms.visible = true; Bottoms_Outline.visible = true; /*if(Clothes.frame <= 5) { Bottoms.visible = true; Bottoms_Outline.visible = true; } else { Bottoms.visible = false; Bottoms_Outline.visible = false; }*/ },this,1,0,0); Bottoms_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon5); this.buttonDown_fnc(Bottoms_Icon5);}; Bottoms_Icon5.visible = false; Bottoms_Icon6 = this.add.button(Border.x,Bottoms_Icon5.y + Bottoms_Icon5.height + 10,"bottoms_icon6",function() { Bottoms.frame = 5; Bottoms_Outline.frame = Bottoms.frame; Bottoms.tint = Colors[1]; Bottoms.visible = true; Bottoms_Outline.visible = true; /*if(Clothes.frame <= 5) { Bottoms.visible = true; Bottoms_Outline.visible = true; } else { Bottoms.visible = false; Bottoms_Outline.visible = false; }*/ },this,1,0,0); Bottoms_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon6); this.buttonDown_fnc(Bottoms_Icon6);}; Bottoms_Icon6.visible = false; Bottoms_Menu_Group = this.add.group(); Bottoms_Menu_Group.add(Bottoms_Icon); Bottoms_Menu_Group.add(Bottoms_Icon2); Bottoms_Menu_Group.add(Bottoms_Icon3); Bottoms_Menu_Group.add(Bottoms_Icon4); Bottoms_Menu_Group.add(Bottoms_Icon5); Bottoms_Menu_Group.add(Bottoms_Icon6); Bottoms_Menu_Group.visible = false; //Dress_Icon Dress_Icon = this.add.button(Border.x,128,"dress_icon",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 6; Clothes_Outline.frame = Clothes.frame; Clothes.x = DressX[0]; Clothes.y = DressY[0]; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; Clothes.tint = Colors2[20]; Bottoms.visible = false; Bottoms_Outline.visible = false; },this,1,0,0); Dress_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon); this.buttonDown_fnc(Dress_Icon);}; Dress_Icon2 = this.add.button(Border.x,Dress_Icon.y + Dress_Icon.height + 10.5,"dress_icon2",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 7; Clothes_Outline.frame = Clothes.frame; Clothes.x = DressX[0]; Clothes.y = DressY[0]; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; Clothes.tint = Colors[1]; Bottoms.visible = false; Bottoms_Outline.visible = false; },this,1,0,0); Dress_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon2); this.buttonDown_fnc(Dress_Icon2);}; Dress_Icon3 = this.add.button(Border.x,Dress_Icon2.y + Dress_Icon2.height + 11,"dress_icon3",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 8; Clothes_Outline.frame = Clothes.frame; Clothes.x = DressX[0]; Clothes.y = DressY[0]; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; Clothes.tint = Colors[30]; Bottoms.visible = false; Bottoms_Outline.visible = false; },this,1,0,0); Dress_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon3); this.buttonDown_fnc(Dress_Icon3);}; Dress_Icon4 = this.add.button(Border.x + .7,Dress_Icon.y + 1.7,"dress_icon4",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 9; Clothes_Outline.frame = Clothes.frame; Clothes.x = DressX[0]; Clothes.y = DressY[0]; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; Clothes.tint = Colors[30]; Bottoms.visible = false; Bottoms_Outline.visible = false; },this,1,0,0); Dress_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon4); this.buttonDown_fnc(Dress_Icon4);}; Dress_Icon4.visible = false; Dress_Icon5 = this.add.button(Border.x + 1,Dress_Icon4.y + Dress_Icon4.height + 9,"dress_icon5",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 10; Clothes_Outline.frame = Clothes.frame; Clothes.x = DressX[0]; Clothes.y = DressY[0]; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; Clothes.tint = Colors[25]; Bottoms.visible = false; Bottoms_Outline.visible = false; },this,1,0,0); Dress_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon5); this.buttonDown_fnc(Dress_Icon5);}; Dress_Icon5.visible = false; Dress_Icon6 = this.add.button(Border.x + 1,Dress_Icon5.y + Dress_Icon5.height + 10,"dress_icon6",function() { Clothes.visible = true; Clothes_Outline.visible = true; Clothes.frame = 11; Clothes_Outline.frame = Clothes.frame; Clothes.x = DressX[0]; Clothes.y = DressY[0]; Clothes_Outline.x = Clothes.x; Clothes_Outline.y = Clothes.y; Clothes.tint = Colors[3]; Bottoms.visible = false; Bottoms_Outline.visible = false; },this,1,0,0); Dress_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon6); this.buttonDown_fnc(Dress_Icon6);}; Dress_Icon6.visible = false; Dress_Menu_Group = this.add.group(); Dress_Menu_Group.add(Dress_Icon); Dress_Menu_Group.add(Dress_Icon2); Dress_Menu_Group.add(Dress_Icon3); Dress_Menu_Group.add(Dress_Icon4); Dress_Menu_Group.add(Dress_Icon5); Dress_Menu_Group.add(Dress_Icon6); Dress_Menu_Group.visible = false; //Shoes_Icon Shoes_Icon = this.add.button(Border.x + .5,130,"shoes_icon",function() { Shoes.visible = true; Shoes_Outline.visible = true; Shoes.frame = 0; Shoes_Outline.frame = Shoes.frame; Shoes.tint = Colors[4]; },this,1,0,0); Shoes_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon); this.buttonDown_fnc(Shoes_Icon);}; Shoes_Icon2 = this.add.button(Border.x + .5,Shoes_Icon.y + Shoes_Icon.height + 10,"shoes_icon2",function() { Shoes.visible = true; Shoes_Outline.visible = true; Shoes.frame = 1; Shoes_Outline.frame = Shoes.frame; Shoes.tint = Colors[1]; },this,1,0,0); Shoes_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon2); this.buttonDown_fnc(Shoes_Icon2);}; Shoes_Icon3 = this.add.button(Border.x + .5,Shoes_Icon2.y + Shoes_Icon2.height + 10,"shoes_icon3",function() { Shoes.visible = true; Shoes_Outline.visible = true; Shoes.frame = 2; Shoes_Outline.frame = Shoes.frame; Shoes.tint = Colors[1]; },this,1,0,0); Shoes_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon3); this.buttonDown_fnc(Shoes_Icon3);}; Shoes_Icon4 = this.add.button(Border.x,Shoes_Icon.y,"shoes_icon4",function() { Shoes.visible = true; Shoes_Outline.visible = true; Shoes.frame = 3; Shoes_Outline.frame = Shoes.frame; Shoes.tint = Colors[35]; },this,1,0,0); Shoes_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon4); this.buttonDown_fnc(Shoes_Icon4);}; Shoes_Icon4.visible = false; Shoes_Icon5 = this.add.button(Border.x,Shoes_Icon4.y + Shoes_Icon4.height + 10,"shoes_icon5",function() { Shoes.visible = true; Shoes_Outline.visible = true; Shoes.frame = 4; Shoes_Outline.frame = Shoes.frame; Shoes.tint = Colors[25]; },this,1,0,0); Shoes_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon5); this.buttonDown_fnc(Shoes_Icon5);}; Shoes_Icon5.visible = false; Shoes_Icon6 = this.add.button(Border.x,Shoes_Icon5.y + Shoes_Icon5.height + 9.3,"shoes_icon6",function() { Shoes.visible = true; Shoes_Outline.visible = true; Shoes.frame = 5; Shoes_Outline.frame = Shoes.frame; Shoes.tint = Colors[3]; },this,1,0,0); Shoes_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon6); this.buttonDown_fnc(Shoes_Icon6);}; Shoes_Icon6.visible = false; Shoes_Menu_Group = this.add.group(); Shoes_Menu_Group.add(Shoes_Icon); Shoes_Menu_Group.add(Shoes_Icon2); Shoes_Menu_Group.add(Shoes_Icon3); Shoes_Menu_Group.add(Shoes_Icon4); Shoes_Menu_Group.add(Shoes_Icon5); Shoes_Menu_Group.add(Shoes_Icon6); Shoes_Menu_Group.visible = false; //Socks_Icon Socks_Icon = this.add.button(Border.x + .5,130,"socks_icon",function() { Socks.visible = true; Socks_Outline.visible = true; Socks.frame = 0; Socks_Outline.frame = Socks.frame; Socks.tint = Colors[0]; if(!Bottoms.visible && Clothes.frame <= 5){Panties.visible = true;} },this,1,0,0); Socks_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon); this.buttonDown_fnc(Socks_Icon);}; Socks_Icon2 = this.add.button(Border.x + .5,Socks_Icon.y + Socks_Icon.height + 10,"socks_icon2",function() { Socks.visible = true; Socks_Outline.visible = true; Socks.frame = 1; Socks_Outline.frame = Socks.frame; Socks.tint = Colors[1]; },this,1,0,0); Socks_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon2); this.buttonDown_fnc(Socks_Icon2);}; Socks_Icon3 = this.add.button(Border.x + .5,Socks_Icon2.y + Socks_Icon2.height + 10,"socks_icon3",function() { Socks.visible = true; Socks_Outline.visible = true; Socks.frame = 2; Socks_Outline.frame = Socks.frame; Socks.tint = Colors[1]; },this,1,0,0); Socks_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon3); this.buttonDown_fnc(Socks_Icon3);}; Socks_Icon4 = this.add.button(Border.x + .5,Socks_Icon.y +.5,"socks_icon4",function() { Socks.visible = true; Socks_Outline.visible = true; Socks.frame = 3; Socks_Outline.frame = Socks.frame; Socks.tint = Colors[1]; },this,1,0,0); Socks_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon4); this.buttonDown_fnc(Socks_Icon4);}; Socks_Icon4.visible = false; Socks_Icon5 = this.add.button(Border.x + .5,Socks_Icon4.y + Socks_Icon4.height + 9,"socks_icon5",function() { Socks.visible = true; Socks_Outline.visible = true; Socks.frame = 4; Socks_Outline.frame = Socks.frame; Socks.tint = Colors[1]; },this,1,0,0); Socks_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon5); this.buttonDown_fnc(Socks_Icon5);}; Socks_Icon5.visible = false; Socks_Icon6 = this.add.button(Border.x + .5,Socks_Icon5.y + Socks_Icon5.height + 10,"socks_icon6",function() { Socks.visible = true; Socks_Outline.visible = true; Socks.frame = 5; Socks_Outline.frame = Socks.frame; Socks.tint = Colors[1]; },this,1,0,0); Socks_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon6); this.buttonDown_fnc(Socks_Icon6);}; Socks_Icon6.visible = false; Socks_Menu_Group = this.add.group(); Socks_Menu_Group.add(Socks_Icon); Socks_Menu_Group.add(Socks_Icon2); Socks_Menu_Group.add(Socks_Icon3); Socks_Menu_Group.add(Socks_Icon4); Socks_Menu_Group.add(Socks_Icon5); Socks_Menu_Group.add(Socks_Icon6); Socks_Menu_Group.visible = false; //Extra_Icon Extra_Icon = this.add.button(Border.x,129,"extra_icon",function() { if(Extra.visible) { Extra.visible = false; Extra_Outline.visible = false; } else { Extra.visible = true; Extra_Outline.visible = true; } },this,1,0,0); Extra_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon); this.buttonDown_fnc(Extra_Icon);}; Extra_Icon2 = this.add.button(Border.x,Extra_Icon.y + Extra_Icon.height + 10.2,"extra_icon2",function() { if(Extra4.visible) { Extra4.visible = false; Extra4_Outline.visible = false; } if(Extra5.visible) { Extra5.visible = false; Extra5_Outline.visible = false; } if(Extra6.visible) { Extra6.visible = false; Extra6_Outline.visible = false; } if(!Extra2.visible) { Extra2.visible = true; Extra2_Outline.visible = true; } else { Extra2.visible = false; Extra2_Outline.visible = false; } },this,1,0,0); Extra_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon2); this.buttonDown_fnc(Extra_Icon2);}; Extra_Icon3 = this.add.button(Border.x,Extra_Icon2.y + Extra_Icon2.height + 9.2,"extra_icon3",function() { if(Extra3.visible) { Extra3.visible = false; Extra3_Outline.visible = false; } else { Extra3.visible = true; Extra3_Outline.visible = true; } },this,1,0,0); Extra_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon3); this.buttonDown_fnc(Extra_Icon3);}; Extra_Icon4 = this.add.button(Border.x,Extra_Icon.y - 1,"extra_icon4",function() { if(Extra2.visible) { Extra2.visible = false; Extra2_Outline.visible = false; } if(Extra5.visible) { Extra5.visible = false; Extra5_Outline.visible = false; } if(Extra6.visible) { Extra6.visible = false; Extra6_Outline.visible = false; } if(!Extra4.visible) { Extra4.visible = true; Extra4_Outline.visible = true; Extra4.tint = Colors[35]; } else { Extra4.visible = false; Extra4_Outline.visible = false; } },this,1,0,0); Extra_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon4); this.buttonDown_fnc(Extra_Icon4);}; Extra_Icon4.visible = false; Extra_Icon5 = this.add.button(Border.x,Extra_Icon4.y + Extra_Icon4.height + 11,"extra_icon5",function() { if(Extra2.visible) { Extra2.visible = false; Extra2_Outline.visible = false; } if(Extra4.visible) { Extra4.visible = false; Extra4_Outline.visible = false; } if(Extra6.visible) { Extra6.visible = false; Extra6_Outline.visible = false; } if(!Extra5.visible) { Extra5.visible = true; Extra5_Outline.visible = true; Extra5.tint = Colors[25]; } else { Extra5.visible = false; Extra5_Outline.visible = false; } },this,1,0,0); Extra_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon5); this.buttonDown_fnc(Extra_Icon5);}; Extra_Icon5.visible = false; Extra_Icon6 = this.add.button(Border.x,Extra_Icon5.y + Extra_Icon5.height + 9.2,"extra_icon6",function() { if(Extra2.visible) { Extra2.visible = false; Extra2_Outline.visible = false; } if(Extra4.visible) { Extra4.visible = false; Extra4_Outline.visible = false; } if(Extra5.visible) { Extra5.visible = false; Extra5_Outline.visible = false; } if(!Extra6.visible) { Extra6.visible = true; Extra6_Outline.visible = true; Extra6.tint = Colors[4]; } else { Extra6.visible = false; Extra6_Outline.visible = false; } },this,1,0,0); Extra_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon6); this.buttonDown_fnc(Extra_Icon6);}; Extra_Icon6.visible = false; Extra_Menu_Group = this.add.group(); Extra_Menu_Group.add(Extra_Icon); Extra_Menu_Group.add(Extra_Icon2); Extra_Menu_Group.add(Extra_Icon3); Extra_Menu_Group.add(Extra_Icon4); Extra_Menu_Group.add(Extra_Icon5); Extra_Menu_Group.add(Extra_Icon6); Extra_Menu_Group.visible = false; //Cake_Icon Cake_Icon = this.add.button(Border.x,130,"cake_icon",function() { Cake.frame = 0; Cake.x = CakeX[0]; Cake.y = CakeY[0]; Cake.tint = Colors[11]; Cake_Outline.frame = Cake.frame; Cake_Outline.x = Cake.x; Cake_Outline.y = Cake.y; if(!Cake.visible) { Cake.visible = true; Cake_Outline.visible = true; Tray.visible = true; } },this,1,0,0); Cake_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Cake_Icon); this.buttonDown_fnc(Cake_Icon);}; Cake_Icon2 = this.add.button(Border.x,Cake_Icon.y + Cake_Icon.height + 10.7,"cake_icon2",function() { Cake.frame = 1; Cake.x = CakeX[1]; Cake.y = CakeY[1]; Cake.tint = Colors[4]; Cake_Outline.frame = Cake.frame; Cake_Outline.x = Cake.x; Cake_Outline.y = Cake.y; if(!Cake.visible) { Cake.visible = true; Cake_Outline.visible = true; Tray.visible = true; } },this,1,0,0); Cake_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Cake_Icon2); this.buttonDown_fnc(Cake_Icon2);}; Cake_Icon3 = this.add.button(Border.x,Cake_Icon2.y + Cake_Icon2.height + 9.7,"cake_icon3",function() { Cake.frame = 2; Cake.x = CakeX[2]; Cake.y = CakeY[2]; Cake.tint = Colors[11]; Cake_Outline.frame = Cake.frame; Cake_Outline.x = Cake.x; Cake_Outline.y = Cake.y; if(!Cake.visible) { Cake.visible = true; Cake_Outline.visible = true; Tray.visible = true; } },this,1,0,0); Cake_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Cake_Icon3); this.buttonDown_fnc(Cake_Icon3);}; Cake_Icon4 = this.add.button(Border.x,130,"cake_icon4",function() { Cake.frame = 3; Cake.x = CakeX[3]; Cake.y = CakeY[3]; Cake.tint = Colors[12]; Cake_Outline.frame = Cake.frame; Cake_Outline.x = Cake.x; Cake_Outline.y = Cake.y; if(!Cake.visible) { Cake.visible = true; Cake_Outline.visible = true; Tray.visible = true; } },this,1,0,0); Cake_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Cake_Icon4); this.buttonDown_fnc(Cake_Icon4);}; Cake_Icon4.visible = false; Cake_Icon5 = this.add.button(Border.x,Cake_Icon4.y + Cake_Icon4.height + 10.2,"cake_icon5",function() { Cake.frame = 4; Cake.x = CakeX[4]; Cake.y = CakeY[4]; Cake.tint = Colors[4]; Cake_Outline.frame = Cake.frame; Cake_Outline.x = Cake.x; Cake_Outline.y = Cake.y; if(!Cake.visible) { Cake.visible = true; Cake_Outline.visible = true; Tray.visible = true; } },this,1,0,0); Cake_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Cake_Icon5); this.buttonDown_fnc(Cake_Icon5);}; Cake_Icon6 = this.add.button(Border.x,Cake_Icon5.y + Cake_Icon5.height + 10.2,"cake_icon6",function() { Cake.frame = 5; Cake.x = CakeX[5]; Cake.y = CakeY[5]; Cake.tint = Colors[1]; Cake_Outline.frame = Cake.frame; Cake_Outline.x = Cake.x; Cake_Outline.y = Cake.y; if(!Cake.visible) { Cake.visible = true; Cake_Outline.visible = true; Tray.visible = true; } },this,1,0,0); Cake_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Cake_Icon6); this.buttonDown_fnc(Cake_Icon6);}; Cake_Menu_Group = this.add.group(); Cake_Menu_Group.add(Cake_Icon); Cake_Menu_Group.add(Cake_Icon2); Cake_Menu_Group.add(Cake_Icon3); Cake_Menu_Group.add(Cake_Icon4); Cake_Menu_Group.add(Cake_Icon5); Cake_Menu_Group.add(Cake_Icon6); Cake_Menu_Group.visible = false; Color_Prev = this.add.button(672,480,"back_btn",function() { colorPage--; if(colorPage == 2) { Color_Pallette.visible = false; Color_Pallette2.visible = true; } else if(colorPage <= 1) { Color_Pallette.visible = true; Color_Pallette2.visible = false; colorPage = 1; } },this,1,0,2); Color_Prev.anchor.setTo(0.5,0.5); Color_Next = this.add.button(Color_Prev.x + Color_Prev.width + 22,Color_Prev.y,"back_btn",function() { colorPage++; if(colorPage == 1) { Color_Pallette.visible = true; Color_Pallette2.visible = false; } else if(colorPage >= 2) { Color_Pallette.visible = false; Color_Pallette2.visible = true; colorPage = 2; } },this,1,0,2); Color_Next.anchor.setTo(0.5,0.5); Color_Next.scale.setTo(-1,1); Color_Group = this.add.group(); Color_Group.add(Color_Pallette); Color_Group.add(Color_Pallette2); Color_Group.add(Color01_Icon); Color_Group.add(Color02_Icon); Color_Group.add(Color03_Icon); Color_Group.add(Color04_Icon); Color_Group.add(Color05_Icon); Color_Group.add(Color06_Icon); Color_Group.add(Color07_Icon); Color_Group.add(Color08_Icon); Color_Group.add(Color09_Icon); Color_Group.add(Color10_Icon); Color_Group.add(Color11_Icon); Color_Group.add(Color12_Icon); Color_Group.add(Color13_Icon); Color_Group.add(Color14_Icon); Color_Group.add(Color15_Icon); Color_Group.add(Color16_Icon); Color_Group.add(Color17_Icon); Color_Group.add(Color18_Icon); Color_Group.add(Color19_Icon); Color_Group.add(Color20_Icon); Color_Group.add(Color21_Icon); Color_Group.add(Color22_Icon); Color_Group.add(Color23_Icon); Color_Group.add(Color24_Icon); Color_Group.add(Color25_Icon); Color_Group.add(Color26_Icon); Color_Group.add(Color27_Icon); Color_Group.add(Color28_Icon); Color_Group.add(Color29_Icon); Color_Group.add(Color30_Icon); Color_Group.add(Color31_Icon); Color_Group.add(Color32_Icon); Color_Group.add(Color33_Icon); Color_Group.add(Color34_Icon); Color_Group.add(Color35_Icon); Color_Group.add(Color36_Icon); Color_Group.add(Color37_Icon); Color_Group.add(Color38_Icon); Color_Group.add(Color39_Icon); Color_Group.add(Color40_Icon); Color_Group.add(Color_Prev); Color_Group.add(Color_Next); Color_Group.visible = false; //Next_Prev Next_Btn = this.add.button(827,266,"next_btn",function() { if(openedMenu == 1) { openedMenuPage ++; if(openedMenuPage > 4) { openedMenuPage = 1; } if(openedMenuPage == 1) { Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 2) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = true; Bang05_Icon.visible = true; Bang06_Icon.visible = true; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 3) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true; } if(openedMenuPage == 4) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = true; Hair05_Icon.visible = true; Hair06_Icon.visible = true; } } if(openedMenu == 6) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Lips01_Icon.visible = true; Lips02_Icon.visible = true; Lips03_Icon.visible = true; Lips04_Icon.visible = false; Lips05_Icon.visible = false; Lips06_Icon.visible = false; } if(openedMenuPage == 2) { Lips01_Icon.visible = false; Lips02_Icon.visible = false; Lips03_Icon.visible = false; Lips04_Icon.visible = true; Lips05_Icon.visible = true; Lips06_Icon.visible = true; } } if(openedMenu == 8) { openedMenuPage ++; if(openedMenuPage >= 3) { openedMenuPage = 1; } if(openedMenuPage == 1) { /*Tops_Menu_Group.visible = true; Tops_Menu_Group2.visible = false;*/ Tops_Icon.visible = true; Tops_Icon2.visible = true; Tops_Icon3.visible = true; Tops_Icon4.visible = false; Tops_Icon5.visible = false; Tops_Icon6.visible = false; } if(openedMenuPage == 2) { /*Tops_Menu_Group.visible = false; Tops_Menu_Group2.visible = true;*/ Tops_Icon.visible = false; Tops_Icon2.visible = false; Tops_Icon3.visible = false; Tops_Icon4.visible = true; Tops_Icon5.visible = true; Tops_Icon6.visible = true; } } if(openedMenu == 9) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Bottoms_Icon.visible = true; Bottoms_Icon2.visible = true; Bottoms_Icon3.visible = true; Bottoms_Icon4.visible = false; Bottoms_Icon5.visible = false; Bottoms_Icon6.visible = false; } if(openedMenuPage == 2) { Bottoms_Icon.visible = false; Bottoms_Icon2.visible = false; Bottoms_Icon3.visible = false; Bottoms_Icon4.visible = true; Bottoms_Icon5.visible = true; Bottoms_Icon6.visible = true; } } if(openedMenu == 10) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Dress_Icon.visible = true; Dress_Icon2.visible = true; Dress_Icon3.visible = true; Dress_Icon4.visible = false; Dress_Icon5.visible = false; Dress_Icon6.visible = false; } if(openedMenuPage == 2) { Dress_Icon.visible = false; Dress_Icon2.visible = false; Dress_Icon3.visible = false; Dress_Icon4.visible = true; Dress_Icon5.visible = true; Dress_Icon6.visible = true; } } if(openedMenu == 11) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Shoes_Icon.visible = true; Shoes_Icon2.visible = true; Shoes_Icon3.visible = true; Shoes_Icon4.visible = false; Shoes_Icon5.visible = false; Shoes_Icon6.visible = false; } if(openedMenuPage == 2) { Shoes_Icon.visible = false; Shoes_Icon2.visible = false; Shoes_Icon3.visible = false; Shoes_Icon4.visible = true; Shoes_Icon5.visible = true; Shoes_Icon6.visible = true; } } if(openedMenu == 12) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Socks_Icon.visible = true; Socks_Icon2.visible = true; Socks_Icon3.visible = true; Socks_Icon4.visible = false; Socks_Icon5.visible = false; Socks_Icon6.visible = false; } if(openedMenuPage == 2) { Socks_Icon.visible = false; Socks_Icon2.visible = false; Socks_Icon3.visible = false; Socks_Icon4.visible = true; Socks_Icon5.visible = true; Socks_Icon6.visible = true; } } if(openedMenu == 13) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Extra_Icon.visible = true; Extra_Icon2.visible = true; Extra_Icon3.visible = true; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; /*Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = false; Extra_Icon11.visible = false; Extra_Icon12.visible = false;*/ } if(openedMenuPage == 2) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = true; Extra_Icon5.visible = true; Extra_Icon6.visible = true; } /*if(openedMenuPage == 3) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = true; Extra_Icon8.visible = true; Extra_Icon9.visible = true; } if(openedMenuPage == 4) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = true; Extra_Icon11.visible = true; Extra_Icon12.visible = true; }*/ } if(openedMenu == 14) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Cake_Icon.visible = true; Cake_Icon2.visible = true; Cake_Icon3.visible = true; Cake_Icon4.visible = false; Cake_Icon5.visible = false; Cake_Icon6.visible = false; } if(openedMenuPage == 2) { Cake_Icon.visible = false; Cake_Icon2.visible = false; Cake_Icon3.visible = false; Cake_Icon4.visible = true; Cake_Icon5.visible = true; Cake_Icon6.visible = true; } } },this); Next_Btn.anchor.setTo(0.5,0.5); Next_Btn.input.pixelPerfectClick = true; Next_Btn.input.pixelPerfectOver = true; Prev_Btn = this.add.sprite(614,Next_Btn.y,"prev_btn"); Prev_Btn.anchor.setTo(0.5,0.5); Prev_Btn.inputEnabled = true; Prev_Btn.input.pixelPerfectClick = true; Prev_Btn.input.pixelPerfectOver = true; Prev_Btn.events.onInputUp.add(function() { if(openedMenu == 1) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 4; } if(openedMenuPage == 1) { Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 2) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = true; Bang05_Icon.visible = true; Bang06_Icon.visible = true; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 3) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 4) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = true; Hair05_Icon.visible = true; Hair06_Icon.visible = true; } } else if(openedMenu == 5) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Lips01_Icon.visible = true; Lips02_Icon.visible = true; Lips03_Icon.visible = true; Lips04_Icon.visible = false; Lips05_Icon.visible = false; Lips06_Icon.visible = false; } if(openedMenuPage == 2) { Lips01_Icon.visible = false; Lips02_Icon.visible = false; Lips03_Icon.visible = false; Lips04_Icon.visible = true; Lips05_Icon.visible = true; Lips06_Icon.visible = true; } } else if(openedMenu == 8) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Tops_Icon.visible = true; Tops_Icon2.visible = true; Tops_Icon3.visible = true; Tops_Icon4.visible = false; Tops_Icon5.visible = false; Tops_Icon6.visible = false; } if(openedMenuPage == 2) { Tops_Icon.visible = false; Tops_Icon2.visible = false; Tops_Icon3.visible = false; Tops_Icon4.visible = true; Tops_Icon5.visible = true; Tops_Icon6.visible = true; } } else if(openedMenu == 9) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Bottoms_Icon.visible = true; Bottoms_Icon2.visible = true; Bottoms_Icon3.visible = true; Bottoms_Icon4.visible = false; Bottoms_Icon5.visible = false; Bottoms_Icon6.visible = false; } if(openedMenuPage == 2) { Bottoms_Icon.visible = false; Bottoms_Icon2.visible = false; Bottoms_Icon3.visible = false; Bottoms_Icon4.visible = true; Bottoms_Icon5.visible = true; Bottoms_Icon6.visible = true; } } else if(openedMenu == 10) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Dress_Icon.visible = true; Dress_Icon2.visible = true; Dress_Icon3.visible = true; Dress_Icon4.visible = false; Dress_Icon5.visible = false; Dress_Icon6.visible = false; } if(openedMenuPage == 2) { Dress_Icon.visible = false; Dress_Icon2.visible = false; Dress_Icon3.visible = false; Dress_Icon4.visible = true; Dress_Icon5.visible = true; Dress_Icon6.visible = true; } } else if(openedMenu == 11) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Shoes_Icon.visible = true; Shoes_Icon2.visible = true; Shoes_Icon3.visible = true; Shoes_Icon4.visible = false; Shoes_Icon5.visible = false; Shoes_Icon6.visible = false; } if(openedMenuPage == 2) { Shoes_Icon.visible = false; Shoes_Icon2.visible = false; Shoes_Icon3.visible = false; Shoes_Icon4.visible = true; Shoes_Icon5.visible = true; Shoes_Icon6.visible = true; } } else if(openedMenu == 12) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Socks_Icon.visible = true; Socks_Icon2.visible = true; Socks_Icon3.visible = true; Socks_Icon4.visible = false; Socks_Icon5.visible = false; Socks_Icon6.visible = false; } if(openedMenuPage == 2) { Socks_Icon.visible = false; Socks_Icon2.visible = false; Socks_Icon3.visible = false; Socks_Icon4.visible = true; Socks_Icon5.visible = true; Socks_Icon6.visible = true; } } else if(openedMenu == 13) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Extra_Icon.visible = true; Extra_Icon2.visible = true; Extra_Icon3.visible = true; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; /*Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = false; Extra_Icon11.visible = false; Extra_Icon12.visible = false;*/ } if(openedMenuPage == 2) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = true; Extra_Icon5.visible = true; Extra_Icon6.visible = true; /*Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false;*/ } /*if(openedMenuPage == 3) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = true; Extra_Icon8.visible = true; Extra_Icon9.visible = true; Extra_Icon10.visible = false; Extra_Icon11.visible = false; Extra_Icon12.visible = false; } if(openedMenuPage == 4) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = true; Extra_Icon11.visible = true; Extra_Icon12.visible = true; }*/ } else if(openedMenu == 14) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Cake_Icon.visible = true; Cake_Icon2.visible = true; Cake_Icon3.visible = true; Cake_Icon4.visible = false; Cake_Icon5.visible = false; Cake_Icon6.visible = false; } if(openedMenuPage == 2) { Cake_Icon.visible = false; Cake_Icon2.visible = false; Cake_Icon3.visible = false; Cake_Icon4.visible = true; Cake_Icon5.visible = true; Cake_Icon6.visible = true; } } },this); Color_Btn = this.add.button(624,479,"color_btn",function() { Color_Btn.visible = false; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.visible = false; Color_Group.visible = true; Color_Pallette.visible = true; Color_Pallette2.visible = false; colorPage = 1; Color_Prev.x = 672; Color_Prev.y = 480; Color_Next.x = Color_Prev.x + Color_Prev.width + 22; Color_Next.y = Color_Prev.y; if(openedMenu == 1){Hair_Menu_Group.visible = false;} if(openedMenu == 6){Lips_Menu_Group.visible = false;} if(openedMenu == 8){Tops_Menu_Group.visible = false;} if(openedMenu == 9){Bottoms_Menu_Group.visible = false;} if(openedMenu == 10){Dress_Menu_Group.visible = false;} if(openedMenu == 11){Shoes_Menu_Group.visible = false;} if(openedMenu == 12){Socks_Menu_Group.visible = false;} if(openedMenu == 13){Extra_Menu_Group.visible = false;} if(openedMenu == 14){Cake_Menu_Group.visible = false;} },this,1,0,2); Color_Btn.anchor.setTo(0.5,0.5); Trash_Btn = this.add.button(816,Color_Prev.y,"trash_btn",function() { if(openedMenu == 1) { Bangs.frame = 4; Bangs_Outline.frame = Bangs.frame; Bangs.tint = Colors[10] Hair.frame = 4; Hair_Outline.frame = Hair.frame; Hair.tint = Colors[10]; hairColor = 10; Bang_Hl.frame = Bangs.frame; Hair_Hl.frame = Hair.frame; Hair_Hl.x = Hair_HlX[Hair_Hl.frame]; Hair_Hl.y = Hair_HlY[Hair_Hl.frame]; } else if(openedMenu == 2) { Bang_Hl.visible = false; Hair_Hl.visible = false; hlVisible = false; } else if(openedMenu == 3) { Eyes.tint = Colors[10]; } else if(openedMenu == 4) { //Eye_Shadow.visible = false; Eyebrows.frame = 0; Eyebrows.x = EyebrowX[0]; Eyebrows.y = EyebrowY[0]; } else if(openedMenu == 5) { Eye_Shadow.visible = false; } else if(openedMenu == 6) { Lips.frame = 0; Lips_Outline.frame = 0; Lips.tint = Colors[8] } else if(openedMenu == 7) { Head.tint = BodyColor[3]; Body.tint = BodyColor[3]; } else if(openedMenu == 8) { Clothes.visible = false; Clothes_Outline.visible = false; Bra.visible = true; if(!Bottoms.visible){Panties.visible = true;} } else if(openedMenu == 9) { Bottoms.visible = false; Bottoms_Outline.visible = false; Panties.visible = true; } else if(openedMenu == 10) { Clothes.visible = false; Clothes_Outline.visible = false; Bra.visible = true; if(!Bottoms.visible){Panties.visible = true;} } else if(openedMenu == 11) { Shoes.visible = false; Shoes_Outline.visible = false; } else if(openedMenu == 12) { Socks.visible = false; Socks_Outline.visible = false; if(Clothes.frame <= 5){Panties.visible = true;} else{Panties.visible = false;} } else if(openedMenu == 13) { Extra.visible = false; Extra_Outline.visible = false; Extra2.visible = false; Extra2_Outline.visible = false; Extra3.visible = false; Extra3_Outline.visible = false; Extra4.visible = false; Extra4_Outline.visible = false; Extra5.visible = false; Extra5_Outline.visible = false; Extra6.visible = false; Extra6_Outline.visible = false; } else if(openedMenu == 14) { Cake.visible = false; Cake_Outline.visible = false; Tray.visible = false; } },this,1,0,2); Trash_Btn.anchor.setTo(0.5,0.5); //Left Side Buttons Hair_Btn = this.add.button(515,55,"hair_btn",function() { openedMenu = 1; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Hair_Menu_Group.visible = true; Hair_Menu_Group.setAll("visible",false); Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; /*Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true;*/ //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; Color_Group.visible = false; colorPage = 1; },this,1,0,2); Hair_Btn.anchor.setTo(0.5,0.5); Hair_Btn.input.pixelPerfectClick = true; Hair_Btn.input.pixelPerfectOver = true; Hl_Btn = this.add.button(Hair_Btn.x,Hair_Btn.y + Hair_Btn.height + 16,"hl_btn",function() { openedMenu = 2; openedMenuPage = 1; Next_Btn.visible = false; Prev_Btn.visible = false; Hair_Menu_Group.visible = false; Color_Btn.visible = false; Color_Group.visible = true; colorPage = 1; Color_Pallette.visible = true; Color_Pallette2.visible = false; Trash_Btn.x = 722; Trash_Btn.visible = true; Color_Prev.x = 615; Color_Next.x = 811; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Hl_Btn.anchor.setTo(0.5,0.5); Hl_Btn.input.pixelPerfectClick = true; Hl_Btn.input.pixelPerfectOver = true; Eye_Btn = this.add.button(Hair_Btn.x,Hl_Btn.y + Hl_Btn.height + 16,"eye_btn",function() { openedMenu = 3; Next_Btn.visible = false; Prev_Btn.visible = false; Hair_Menu_Group.visible = false; Color_Btn.visible = false; Color_Group.visible = true; colorPage = 1; Color_Pallette.visible = true; Color_Pallette2.visible = false; Trash_Btn.x = 722; Trash_Btn.visible = true; Color_Prev.x = 615; Color_Next.x = 811; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Eye_Btn.anchor.setTo(0.5,0.5); Eye_Btn.input.pixelPerfectClick = true; Eye_Btn.input.pixelPerfectOver = true; Eyebrows_Btn = this.add.button(Eye_Btn.x - 7,Eye_Btn.y + Eye_Btn.height + 16,"eyebrow_btn",function() { openedMenu = 4; Next_Btn.visible = false; Prev_Btn.visible = false; Color_Btn.visible = false; Trash_Btn.visible = true; Trash_Btn.x = 816; Lips_Menu_Group.visible = false; Eyebrows_Menu_Group.visible = true; //Eyeshadow_Color_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Eyebrows_Btn.anchor.setTo(0.5,0.5); Eye_Shadow_Btn = this.add.button(Eyebrows_Btn.x,Eyebrows_Btn.y + Eyebrows_Btn.height + 16,"eyeshadow_btn",function() { openedMenu = 5; Next_Btn.visible = false; Prev_Btn.visible = false; Hair_Menu_Group.visible = false; Color_Btn.visible = false; Color_Group.visible = true; colorPage = 1; Color_Pallette.visible = true; Color_Pallette2.visible = false; Trash_Btn.x = 722; Trash_Btn.visible = true; Color_Prev.x = 615; Color_Next.x = 811; //Eyeshadow_Color_Group.visible = true; Eyebrows_Menu_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Eye_Shadow_Btn.anchor.setTo(0.5,0.5); Eye_Shadow_Btn.input.pixelPerfectClick = true; Eye_Shadow_Btn.input.pixelPerfectOver = true; Lips_Btn = this.add.button(Eye_Shadow_Btn.x,Eye_Shadow_Btn.y + Eye_Shadow_Btn.height + 16,"lips_btn",function() { openedMenu = 6; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Lips_Menu_Group.visible = true; Lips_Menu_Group.setAll("visible",false); Lips01_Icon.visible = true; Lips02_Icon.visible = true; Lips03_Icon.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Lips_Btn.anchor.setTo(0.5,0.5); Lips_Btn.input.pixelPerfectClick = true; Lips_Btn.input.pixelPerfectOver = true; SkinTone_Btn = this.add.button(Lips_Btn.x + 7,Lips_Btn.y + Lips_Btn.height + 14,"skintone_btn",function() { openedMenu = 7; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = 720; Trash_Btn.visible = true; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = true; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); SkinTone_Btn.anchor.setTo(0.5,0.5); SkinTone_Btn.input.pixelPerfectClick = true; SkinTone_Btn.input.pixelPerfectOver = true; //Right Side Buttons Tops_Btn = this.add.button(925,Hair_Btn.y,"tops_btn",function() { openedMenu = 8; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Tops_Menu_Group.visible = true; Tops_Menu_Group.setAll("visible",false); Tops_Icon.visible = true; Tops_Icon2.visible = true; Tops_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Tops_Btn.anchor.setTo(0.5,0.5); Tops_Btn.input.pixelPerfectClick = true; Tops_Btn.input.pixelPerfectOver = true; Bottoms_Btn = this.add.button(Tops_Btn.x,Tops_Btn.y + Tops_Btn.height + 16,"bottoms_btn",function() { openedMenu = 9; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Bottoms_Menu_Group.visible = true; Bottoms_Menu_Group.setAll("visible",false); Bottoms_Icon.visible = true; Bottoms_Icon2.visible = true; Bottoms_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Bottoms_Btn.anchor.setTo(0.5,0.5); Bottoms_Btn.input.pixelPerfectClick = true; Bottoms_Btn.input.pixelPerfectOver = true; Dress_Btn = this.add.button(Bottoms_Btn.x - 7,Bottoms_Btn.y + Bottoms_Btn.height + 16,"dress_btn",function() { openedMenu = 10; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Dress_Menu_Group.visible = true; Dress_Menu_Group.setAll("visible",false); Dress_Icon.visible = true; Dress_Icon2.visible = true; Dress_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Dress_Btn.anchor.setTo(0.5,0.5); Dress_Btn.input.pixelPerfectClick = true; Dress_Btn.input.pixelPerfectOver = true; Shoes_Btn = this.add.button(Dress_Btn.x,Dress_Btn.y + Dress_Btn.height + 16,"shoes_btn",function() { openedMenu = 11; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Shoes_Menu_Group.visible = true; Shoes_Menu_Group.setAll("visible",false); Shoes_Icon.visible = true; Shoes_Icon2.visible = true; Shoes_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Shoes_Btn.anchor.setTo(0.5,0.5); Shoes_Btn.input.pixelPerfectClick = true; Shoes_Btn.input.pixelPerfectOver = true; Socks_Btn = this.add.button(Shoes_Btn.x + 7,Shoes_Btn.y + Shoes_Btn.height + 16,"socks_btn",function() { openedMenu = 12; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Socks_Menu_Group.visible = true; Socks_Menu_Group.setAll("visible",false); Socks_Icon.visible = true; Socks_Icon2.visible = true; Socks_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Socks_Btn.anchor.setTo(0.5,0.5); Socks_Btn.input.pixelPerfectClick = true; Socks_Btn.input.pixelPerfectOver = true; Extra_Btn = this.add.button(Socks_Btn.x,Socks_Btn.y + Socks_Btn.height + 16,"extra_btn",function() { openedMenu = 13; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Extra_Menu_Group.visible = true; Extra_Menu_Group.setAll("visible",false); Extra_Icon.visible = true; Extra_Icon2.visible = true; Extra_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Cake_Menu_Group.visible = false; },this,1,0,2); Extra_Btn.anchor.setTo(0.5,0.5); Extra_Btn.input.pixelPerfectClick = true; Extra_Btn.input.pixelPerfectOver = true; Cake_Btn = this.add.button(Extra_Btn.x - 7,Extra_Btn.y + Extra_Btn.height + 16,"cake_btn",function() { openedMenu = 14; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.visible = true; Trash_Btn.x = 816; Cake_Menu_Group.visible = true; Cake_Menu_Group.setAll("visible",false); Cake_Icon.visible = true; Cake_Icon2.visible = true; Cake_Icon3.visible = true; //Eyeshadow_Color_Group.visible = false; Extra_Menu_Group.visible = false; Eyebrows_Menu_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; },this,1,0,2); Cake_Btn.anchor.setTo(0.5,0.5); Cake_Btn.input.pixelPerfectClick = true; Cake_Btn.input.pixelPerfectOver = true; //Bottom Buttons /*Shuffle_Btn = this.add.button(627,593,"shuffle_btn",function() { this.Shuffle_Items(); },this,1,0,2); Shuffle_Btn.anchor.setTo(0.5,0.5);*/ Show_Btn = this.add.button(664,591,"show_btn",function() { Border.visible = false; Hair_Btn.visible = false; Hl_Btn.visible = false; Eye_Btn.visible = false; Eyebrows_Btn.visible = false; Eye_Shadow_Btn.visible = false; Lips_Btn.visible = false; SkinTone_Btn.visible = false; Tops_Btn.visible = false; Bottoms_Btn.visible = false; Dress_Btn.visible = false; Shoes_Btn.visible = false; Socks_Btn.visible = false; Extra_Btn.visible = false; Cake_Btn.visible = false; Color_Btn.visible = false; Trash_Btn.visible = false; Next_Btn.visible = false; Prev_Btn.visible = false; //Shuffle_Btn.visible = false; Show_Btn.visible = false; Reset_Btn.visible = false; Retry_Btn.visible = true; Save_Btn.visible = true; MoreGames_Btn.visible = true; End_Logo.visible = true; Logo.visible = false; //openedMenu == 1 Hair_Menu_Group.visible = false; Color_Group.visible = false; //openedMenu == 2 //Hl_Color_Group.visible = false; //openedMenu == 3 //openedMenu == 4 //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; //openedMenu == 5 Lips_Menu_Group.visible = false; //openedMenu == 6 SkinColor_Menu_Group.visible = false; //openedMenu == 7 Tops_Menu_Group.visible = false; //openedMenu == 8 Bottoms_Menu_Group.visible = false; //openedMenu == 9 Dress_Menu_Group.visible = false; //openedMenu == 10 Shoes_Menu_Group.visible = false; //openedMenu == 11 Socks_Menu_Group.visible = false; //openedMenu == 12 Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; Doll_Group.x = 240; },this,1,0,2); Show_Btn.anchor.setTo(0.5,0.5); Reset_Btn = this.add.button(760,Show_Btn.y,"reset_btn",function() { Bra.visible = true; Panties.visible = true; Bangs.frame = 4; Bangs_Outline.frame = Bangs.frame; Bangs.tint = Colors[10] Hair.frame = 4; Hair_Outline.frame = Hair.frame; Hair.tint = Colors[10]; hairColor = 10; Bang_Hl.visible = false; Bang_Hl.frame = Bangs.frame; Hair_Hl.visible = false; Hair_Hl.frame = Hair.frame; hlVisible = false; Eyes.tint = Colors[10]; //Eye_Shadow.visible = false; Eyebrows.frame = 0; Eyebrows.x = EyebrowX[0]; Eyebrows.y = EyebrowY[0]; Eye_Shadow.visible = false; Lips.frame = 0; Lips_Outline.frame = 0; Lips.tint = Colors[8] Head.tint = BodyColor[3]; Body.tint = BodyColor[3]; Clothes.visible = false; Clothes_Outline.visible = false; Bottoms.visible = false; Bottoms_Outline.visible = false; Clothes.visible = false; Clothes_Outline.visible = false; Shoes.visible = false; Shoes_Outline.visible = false; Socks.visible = false; Socks_Outline.visible = false; Extra.visible = false; Extra_Outline.visible = false; Extra2.visible = false; Extra2_Outline.visible = false; Extra3.visible = false; Extra3_Outline.visible = false; Extra4.visible = false; Extra4_Outline.visible = false; Extra5.visible = false; Extra5_Outline.visible = false; Extra6.visible = false; Extra6_Outline.visible = false; Cake.visible = true; Cake_Outline.visible = true; Cake.frame = [0]; Cake_Outline.frame = Cake.frame; Cake.visible = false; Cake_Outline.visible = false; Tray.visible = false; },this,1,0,2); Reset_Btn.anchor.setTo(0.5,0.5); //End Screen Buttons Retry_Btn = this.add.button(926,448,"retry_btn",function() { Border.visible = true; Hair_Btn.visible = true; Hl_Btn.visible = true; Eye_Btn.visible = true; Eyebrows_Btn.visible = true; Eye_Shadow_Btn.visible = true; Lips_Btn.visible = true; SkinTone_Btn.visible = true; Tops_Btn.visible = true; Bottoms_Btn.visible = true; Dress_Btn.visible = true; Shoes_Btn.visible = true; Socks_Btn.visible = true; Extra_Btn.visible = true; Cake_Btn.visible = true; Color_Btn.visible = true; Next_Btn.visible = true; Prev_Btn.visible = true; Trash_Btn.visible = true; //Shuffle_Btn.visible = true; Show_Btn.visible = true; Reset_Btn.visible = true; Retry_Btn.visible = false; Save_Btn.visible = false; MoreGames_Btn.visible = false; End_Logo.visible = false; Logo.visible = true; openedMenu = 1; openedMenuPage = 1; colorPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Hair_Menu_Group.visible = true; Hair_Menu_Group.setAll("visible",false); Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; /*Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true;*/ Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Lips_Menu_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Cake_Menu_Group.visible = false; Doll_Group.x = 0; },this,1,0,2); Retry_Btn.anchor.setTo(0.5,0.5); Retry_Btn.visible = false; Save_Btn = this.add.button(Retry_Btn.x,Retry_Btn.y + Retry_Btn.height,"save_btn",function() { this.SaveScreenshot(); },this,1,0,2); Save_Btn.anchor.setTo(0.5,0.5); Save_Btn.visible = false; MoreGames_Btn = this.add.button(Save_Btn.x,Save_Btn.y + Save_Btn.height,"moregames_btn",function() { window.open("http://www.kawaiigames.net/exclusive-games","_blank"); },this,1,0,2); MoreGames_Btn.anchor.setTo(0.5,0.5); MoreGames_Btn.visible = false; End_Logo = this.add.button(893,78,"logo",function() { window.open("http://www.kawaiigames.net/?utm_source=rosanna_pansino_dress_up&utm_medium=html5game","_blank"); },this,1,0,2); End_Logo.anchor.setTo(0.5,0.5); End_Logo.scale.setTo(1.2,1.2); End_Logo.smoothed = false; End_Logo.visible = false; Logo = this.add.button(0,0,"logo",function() { window.open("http://www.kawaiigames.net/?utm_source=rosanna_pansino_dress_up&utm_medium=html5game","_blank"); },this,1,0,2); Logo.anchor.setTo(0.5,0.5); Logo.x = 81; Logo.y = 538; Credits_Btn = this.add.button(0,0,"credits_btn",function() { //hide the Credits_Btn Credits_Btn.visible = false; //make the Credits_Group visible Credits_Group.visible = true; //disable all buttons that is not meant to be clickable when Credits shows up Hair_Btn.inputEnabled = false; Hl_Btn.inputEnabled = false; Eye_Btn.inputEnabled = false; Eyebrows_Btn.inputEnabled = false; Eye_Shadow_Btn.inputEnabled = false; Lips_Btn.inputEnabled = false; SkinTone_Btn.inputEnabled = false; Tops_Btn.inputEnabled = false; Bottoms_Btn.inputEnabled = false; Dress_Btn.inputEnabled = false; Shoes_Btn.inputEnabled = false; Socks_Btn.inputEnabled = false; Extra_Btn.inputEnabled = false; Cake_Btn.inputEnabled = false; Color_Btn.inputEnabled = false; Next_Btn.inputEnabled = false; Prev_Btn.inputEnabled = false; Trash_Btn.inputEnabled = false; //Shuffle_Btn.inputEnabled = false; Show_Btn.inputEnabled = false; Reset_Btn.inputEnabled = false; Next_Btn.inputEnabled = false; Prev_Btn.inputEnabled = false; Logo.inputEnabled = false; End_Logo.inputEnabled = false; Retry_Btn.inputEnabled = false; Save_Btn.inputEnabled = false; MoreGames_Btn.inputEnabled = false; Hair_Menu_Group.setAll("inputEnabled",false); Color_Group.setAll("inputEnabled",false); //Eyeshadow_Color_Group.setAll("inputEnabled",false); Eyebrows_Menu_Group.setAll("inputEnabled",false); Lips_Menu_Group.setAll("inputEnabled",false); SkinColor_Menu_Group.setAll("inputEnabled",false); Tops_Menu_Group.setAll("inputEnabled",false); Bottoms_Menu_Group.setAll("inputEnabled",false); Dress_Menu_Group.setAll("inputEnabled",false); Shoes_Menu_Group.setAll("inputEnabled",false); Socks_Menu_Group.setAll("inputEnabled",false); Extra_Menu_Group.setAll("inputEnabled",false); Cake_Menu_Group.setAll("inputEnabled",false); },this,1,0,2); Credits_Btn.anchor.setTo(0.5,0.5); Credits_Btn.x = 75; Credits_Btn.y = 614; //---------------------------------------------------------// //Credits Screen //Screen_Effect (black screen at the back of the credits screen) //the first 0 is the x and the second 0 is the y Screen_Effect = this.add.sprite(0,0,"screen_effect"); //Credits_Text includes the credits text and the pink border Credits_Text = this.add.sprite(0,0,"credits_text"); Credits_Text.anchor.setTo(0.5,0.5); Credits_Text.x = CenterX; Credits_Text.y = CenterY; //Close button at the upper right corner of the Credits_Text /*We add it as a sprite so that we can make it zoom in and zoom out by scaling it when the user click the close button*/ Close_Btn = this.add.button(0,0,"close_btn",function() { //we make the Credits_Group invisible and the Credits_Btn visible again Credits_Group.visible = false; Credits_Btn.visible = true; //enable all buttons that is meant to be clickable when Credits is closed Hair_Btn.inputEnabled = true; Hl_Btn.inputEnabled = true; Eye_Btn.inputEnabled = true; Eyebrows_Btn.inputEnabled = true; Eye_Shadow_Btn.inputEnabled = true; Lips_Btn.inputEnabled = true; SkinTone_Btn.inputEnabled = true; Tops_Btn.inputEnabled = true; Bottoms_Btn.inputEnabled = true; Dress_Btn.inputEnabled = true; Shoes_Btn.inputEnabled = true; Socks_Btn.inputEnabled = true; Extra_Btn.inputEnabled = true; Cake_Btn.inputEnabled = true; Color_Btn.inputEnabled = true; Next_Btn.inputEnabled = true; Prev_Btn.inputEnabled = true; Trash_Btn.inputEnabled = true; //Shuffle_Btn.inputEnabled = true; Show_Btn.inputEnabled = true; Reset_Btn.inputEnabled = true; Next_Btn.inputEnabled = true; Prev_Btn.inputEnabled = true; Logo.inputEnabled = true; End_Logo.inputEnabled = true; Retry_Btn.inputEnabled = true; Save_Btn.inputEnabled = true; MoreGames_Btn.inputEnabled = true; Hair_Menu_Group.setAll("inputEnabled",true); Color_Group.setAll("inputEnabled",true); Eyebrows_Menu_Group.setAll("inputEnabled",true); Lips_Menu_Group.setAll("inputEnabled",true); SkinColor_Menu_Group.setAll("inputEnabled",true); Tops_Menu_Group.setAll("inputEnabled",true); Bottoms_Menu_Group.setAll("inputEnabled",true); Dress_Menu_Group.setAll("inputEnabled",true); Shoes_Menu_Group.setAll("inputEnabled",true); Socks_Menu_Group.setAll("inputEnabled",true); Extra_Menu_Group.setAll("inputEnabled",true); Cake_Menu_Group.setAll("inputEnabled",true); },this,1,0,2); Close_Btn.anchor.setTo(0.5,0.5); Close_Btn.x = 876; Close_Btn.y = 91; //Group that will hold all the graphics that we need for the credits screen Credits_Group = this.add.group(); Credits_Group.add(Screen_Effect); Credits_Group.add(Credits_Text); Credits_Group.add(Close_Btn); //we make it initially invisible to hide it from the users view Credits_Group.visible = false; //-----------------------------------------------------------// //Soundbtn SoundBtn = this.add.button(60,40,"sound_btn", function() { if(!MuteBool) { SoundBtn.animations.play("soundOff"); this.sound.mute = true; MuteBool = true; } else if(MuteBool) { SoundBtn.animations.play("soundOn"); this.sound.mute = false; MuteBool = false; } },this); SoundBtn.anchor.setTo(0.5,0.5); SoundBtn.animations.add("soundOn",[0],1,false); SoundBtn.animations.add("soundOff",[1],1,false); if(!MuteBool) { SoundBtn.animations.play("soundOn"); } else if(MuteBool) { SoundBtn.animations.play("soundOff"); } //--------------------------------------------------------------------------// }, buttonUp_fnc: function(buttonObj) { buttonObj.events.onInputUp.add(function(){buttonObj.frame = 0;},this); }, buttonDown_fnc: function(buttonObj) { buttonObj.events.onInputDown.add(function(){buttonObj.frame = 1;},this); }, SaveScreenshot: function() { /*We set all of this buttons visibility to false so that when the game makes a screenshot, there are no buttons in it*/ Credits_Btn.visible = false; Retry_Btn.visible = false; Save_Btn.visible = false; MoreGames_Btn.visible = false; SoundBtn.visible = false; /*We add a game timer and set it to 90 miliseconds to give the Savescreenshot function some time to take a screenshot while there are no buttons in the screen*/ this.game.time.events.add(90,function() { /*this is a pure javascript code for taking a screenshot of the canvas and saving it locally in the players laptop,pc, chrome mobile/tablet*/ var a = document.createElement('a'); var Data = this.game.canvas.toDataURL( 'image/png' ).replace( 'image/png', 'image/octet-stream' ); a.setAttribute('download', 'kawaii-games-rosanna-pansino-dress-up.png'); // change this ^^^^^ if you want a different file name a.href = Data; a.innerHTML = 'testing'; a.style.display = 'none'; a.click(); /*after taking a screenshot and saving it, we will set the buttons visibility to true again so we can use them*/ Credits_Btn.visible = true; Retry_Btn.visible = true; Save_Btn.visible = true; MoreGames_Btn.visible = true; SoundBtn.visible = true; },this); }, NormalSize_fnc: function() { /*Set the Character_Group that holds all the doll's assets X and Y position and scale/resize it to it's normal size*/ //Doll_Group.scale.setTo(0.5,0.5); Doll_Group.x = 0; Doll_Group.y = 1; /*this will set the smoothness filter for all the graphics/assets that are in the Character_Group. If you wanted all the graphics to be crisp, you can set this v to false. (I don't know if you're going to like it)*/ //Doll_Group.setAll("smoothed",true); }, ScaleDoll: function() { /*Set the Character_Group that holds all the doll's assets X and Y position and scale/resize it to a much bigger size (Zoom in effect)*/ /*Doll_Group.x = -209; Doll_Group.y = -26; Doll_Group.scale.setTo(1,1);*/ /*this will set the smoothness filter for all the graphics/assets that are in the Doll_Group. It is set to false v so that when we scale the graphics to a larger size, it will still be going to be crisp.*/ //Doll_Group.setAll("smoothed",false); }, changeColor: function(Num,HairColorNum2) { if(colorPage == 1) { if(openedMenu == 1) { hairColor = Num; Hair.tint = Colors[Num]; Bangs.tint = Hair.tint; } else if(openedMenu == 2) { Hair_Hl.visible = true; Bang_Hl.visible = true; Hair_Hl.tint = Colors[Num]; Bang_Hl.tint = Hair_Hl.tint; } else if(openedMenu == 3){Eyes.tint = Colors[Num];} else if(openedMenu == 5) { Eye_Shadow.visible = true; Eye_Shadow.tint = Colors[Num]; } else if(openedMenu == 6){Lips.tint = Colors[Num];} else if(openedMenu == 8 || openedMenu == 10){Clothes.tint = Colors[Num];} else if(openedMenu == 9){Bottoms.tint = Colors[Num];} else if(openedMenu == 11){Shoes.tint = Colors[Num];} else if(openedMenu == 12){Socks.tint = Colors[Num];} else if(openedMenu == 13) { Extra.tint = Colors[Num]; Extra2.tint = Colors[Num]; Extra3.tint = Colors[Num]; Extra4.tint = Colors[Num]; Extra5.tint = Colors[Num]; Extra6.tint = Colors[Num]; } else if(openedMenu == 14){Cake.tint = Colors[Num];} } else if(colorPage == 2) { if(openedMenu == 1) { hairColor = HairColorNum2; Hair.tint = Colors2[Num]; Bangs.tint = Hair.tint; } else if(openedMenu == 2) { Hair_Hl.visible = true; Bang_Hl.visible = true; Hair_Hl.tint = Colors2[Num]; Bang_Hl.tint = Hair_Hl.tint; } else if(openedMenu == 3){Eyes.tint = Colors2[Num];} else if(openedMenu == 5) { Eye_Shadow.visible = true; Eye_Shadow.tint = Colors2[Num]; } else if(openedMenu == 6){Lips.tint = Colors2[Num];} else if(openedMenu == 8 || openedMenu == 10){Clothes.tint = Colors2[Num];} else if(openedMenu == 9){Bottoms.tint = Colors2[Num];} else if(openedMenu == 11){Shoes.tint = Colors2[Num];} else if(openedMenu == 12){Socks.tint = Colors2[Num];} else if(openedMenu == 13) { Extra.tint = Colors2[Num]; Extra2.tint = Colors2[Num]; Extra3.tint = Colors2[Num]; Extra4.tint = Colors2[Num]; Extra5.tint = Colors2[Num]; Extra6.tint = Colors2[Num]; } else if(openedMenu == 14){Cake.tint = Colors2[Num];} } }, checkHairColor: function() { if(hairColor <= 39) { for(var i = 0; i < 40; i++) { if(hairColor == i){Hair.tint = Colors[i];} } } if(hairColor >= 40) { for(var j = 0; j < 40; j++) { if(hairColor == j){Hair.tint = Colors2[j];} } } }, checkBangsColor: function() { if(hairColor <= 39) { for(var i = 0; i < 40; i++) { if(hairColor == i){Bangs.tint = Colors[i];} } } if(hairColor >= 40) { for(var j = 0; j < 40; j++) { if(hairColor == j){Bangs.tint = Colors2[j];} } } }, Bang_fnc: function(BangKey,BangName,BangX,BangY) { if(Bangs.key != BangKey) { Bangs.destroy(); Bangs = this.add.sprite(0,0,BangKey); Bangs.anchor.setTo(0.5,0.5); Bangs.x = BangX; Bangs.y = BangY; Bangs.name = BangName; } /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(Bang_Hl.visible && BangName == "Bang07") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl07_0001","BangHl07",BangHl07X,BangHl07Y);} . . . }*/ if(BangName == "Bang01") { /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(hlColor == 18){this.Bang_Hl_fnc("bang_hl01_0018","BangHl01",BangHl01X,BangHl01Y);} */ this.Bang_Hl_fnc("bang_hl","BangHl01",Bang_HlX,Bang_HlY); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang02") { this.Bang_Hl_fnc("bang_hl2","BangHl02",Bang_HlX2,Bang_HlY2); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang03") { this.Bang_Hl_fnc("bang_hl3","BangHl03",Bang_HlX3,Bang_HlY3); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang04") { this.Bang_Hl_fnc("bang_hl4","BangHl04",Bang_HlX4,Bang_HlY4); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang05") { this.Bang_Hl_fnc("bang_hl5","BangHl05",Bang_HlX5,Bang_HlY5); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang06") { this.Bang_Hl_fnc("bang_hl6","BangHl06",Bang_HlX6,Bang_HlY6); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Bang_Hl_fnc: function(Bang_HlKey,Bang_HlName,Bang_HlX,Bang_HlY) { Bang_Hl.destroy(); Bang_Hl = this.add.sprite(0,0,Bang_HlKey); Bang_Hl.anchor.setTo(0.5,0.5); Bang_Hl.x = Bang_HlX; Bang_Hl.y = Bang_HlY; Bang_Hl.name = Bang_HlName; if(hlVisible){Bang_Hl.visible = true;} else{Bang_Hl.visible = false;} /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Hair_fnc: function(HairKey,HairName,HairX,HairY) { /*if the Hair.key(image sprite that the Hair sprite is created, Example: "hair01_0010") is not equal to HairKey*/ if(Hair.key != HairKey) { /*destroy/erase the Hair and make a new Hair sprite using the HairKey that we passed in this Hair_fnc function.*/ Hair.destroy(); /*create a new button*/ Hair = this.add.button(0,0,HairKey); Hair.anchor.setTo(0.5,0.5); Hair.input.pixelPerfectClick = true; Hair.x = HairX; Hair.y = HairY; Hair.name = HairName; } /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(Hair_Hl.visible && HairName == "Hair07") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl07_0001","HairHl07",HairHl07X,HairHl07Y);} . . . }*/ /*if(HairName == "Hair01") { this.Hair_Hl_fnc("hair_hl","HairHl01",Hair_HlX,Hair_HlY); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair02") { this.Hair_Hl_fnc("hair_hl2","HairHl02",Hair_HlX2,Hair_HlY2); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair03") { this.Hair_Hl_fnc("hair_hl3","HairHl03",Hair_HlX3,Hair_HlY3); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair04") { this.Hair_Hl_fnc("hair_hl4","HairHl04",Hair_HlX4,Hair_HlY4); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair05") { this.Hair_Hl_fnc("hair_hl5","HairHl05",Hair_HlX5,Hair_HlY5); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair06") { this.Hair_Hl_fnc("hair_hl6","HairHl06",Hair_HlX6,Hair_HlY6); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} }*/ /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Hair_Hl_fnc: function(Hair_HlKey,Hair_HlName,Hair_HlX,Hair_HlY) { Hair_Hl.destroy(); Hair_Hl = this.add.sprite(0,0,Hair_HlKey); Hair_Hl.anchor.setTo(0.5,0.5); Hair_Hl.x = Hair_HlX; Hair_Hl.y = Hair_HlY; Hair_Hl.name = Hair_HlName; if(hlVisible){Hair_Hl.visible = true;} else{Hair_Hl.visible = false;} /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Lips_fnc: function(LipsKey,LipsName,LipsX,LipsY) { Lips.destroy(); Lips = this.add.button(0,0,LipsKey); Lips.anchor.setTo(0.5,0.5); Lips.input.pixelPerfectClick = true; Lips.x = LipsX; Lips.y = LipsY; Lips.name = LipsName; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Clothes_fnc: function(ClothesKey,ClothesName,ClothesX,ClothesY) { Clothes.destroy(); Clothes = this.add.button(0,0,ClothesKey); Clothes.anchor.setTo(0.5,0.5); Clothes.input.pixelPerfectClick = true; Clothes.x = ClothesX; Clothes.y = ClothesY; Clothes.name = ClothesName; //Bra.visible = false; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Bottoms_fnc: function(BottomsKey,BottomsName,BottomsX,BottomsY) { Bottoms.destroy(); Bottoms = this.add.button(0,0,BottomsKey); Bottoms.anchor.setTo(0.5,0.5); Bottoms.input.pixelPerfectClick = true; Bottoms.x = BottomsX; Bottoms.y = BottomsY; Bottoms.name = BottomsName; Panties.visible = false; if(Clothes.name == "Dress01" || Clothes.name == "Dress02" || Clothes.name == "Dress03" || Clothes.name == "Dress04" || Clothes.name == "Dress05" || Clothes.name == "Dress06") { Clothes.visible = false; } /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Shoes_fnc: function(ShoesKey,ShoesName,ShoesX,ShoesY) { Shoes.destroy(); Shoes = this.add.button(0,0,ShoesKey,function() { Shoes.visible = false; },this); Shoes.anchor.setTo(0.5,0.5); Shoes.input.pixelPerfectClick = true; Shoes.x = ShoesX; Shoes.y = ShoesY; Shoes.name = ShoesName; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Socks_fnc: function(SocksKey,SocksName,SocksX,SocksY) { Socks.destroy(); Socks = this.add.button(0,0,SocksKey,function() { Socks.visible = false; },this); Socks.anchor.setTo(0.5,0.5); Socks.pixelPerfectClick = true; Socks.x = SocksX; Socks.y = SocksY; Socks.name = SocksName; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, //Shuffle Shuffle_Items: function() { var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.Hair_fnc("hair","Hair01",HairX,HairY);} if(HairRand == 2){this.Hair_fnc("hair2","Hair02",HairX2,HairY2);} if(HairRand == 3){this.Hair_fnc("hair3","Hair03",HairX3,HairY3);} if(HairRand == 4){this.Hair_fnc("hair4","Hair04",HairX4,HairY4);} if(HairRand == 5){this.Hair_fnc("hair5","Hair05",HairX5,HairY5);} if(HairRand == 6){this.Hair_fnc("hair6","Hair06",HairX6,HairY6);} /*var BangsRand = Math.floor(Math.random()*(6-1+1))+1; if(BangsRand == 1){this.Bang_fnc("bangs","Bang01",BangsX,BangsY);} if(BangsRand == 2){this.Bang_fnc("bangs2","Bang02",BangsX2,BangsY2);} if(BangsRand == 3){this.Bang_fnc("bangs3","Bang03",BangsX3,BangsY3);} if(BangsRand == 4){this.Bang_fnc("bangs4","Bang04",BangsX4,BangsY4);} if(BangsRand == 5){this.Bang_fnc("bangs5","Bang05",BangsX5,BangsY5);} if(BangsRand == 6){this.Bang_fnc("bangs6","Bang06",BangsX6,BangsY6);}*/ var HairColorRand = Math.floor(Math.random()*(12-1+1))+1; if(HairColorRand == 1) { Hair.frame = 0; Bangs.frame = 0; hairColor = 0; } if(HairColorRand == 2) { Hair.frame = 1; Bangs.frame = 1; hairColor = 1; } if(HairColorRand == 3) { Hair.frame = 2; Bangs.frame = 2; hairColor = 2; } if(HairColorRand == 4) { Hair.frame = 3; Bangs.frame = 3; hairColor = 3; } if(HairColorRand == 5) { Hair.frame = 4; Bangs.frame = 4; hairColor = 4; } if(HairColorRand == 6) { Hair.frame = 5; Bangs.frame = 5; hairColor = 5; } if(HairColorRand == 7) { Hair.frame = 6; Bangs.frame = 6; hairColor = 6; } if(HairColorRand == 8) { Hair.frame = 7; Bangs.frame = 7; hairColor = 7; } if(HairColorRand == 9) { Hair.frame = 8; Bangs.frame = 8; hairColor = 8; } if(HairColorRand == 10) { Hair.frame = 9; Bangs.frame = 9; hairColor = 9; } if(HairColorRand == 11) { Hair.frame = 10; Bangs.frame = 10; hairColor = 10; } if(HairColorRand == 12) { Hair.frame = 11; Bangs.frame = 11; hairColor = 11; } var HlRand = Math.floor(Math.random()*(12-1+1))+1; if(HlRand == 1) { //Hair_Hl.frame = 0; Bang_Hl.frame = 0; } if(HlRand == 2) { //Hair_Hl.frame = 1; Bang_Hl.frame = 1; } if(HlRand == 3) { //Hair_Hl.frame = 2; Bang_Hl.frame = 2; } if(HlRand == 4) { //Hair_Hl.frame = 3; Bang_Hl.frame = 3; } if(HlRand == 5) { //Hair_Hl.frame = 4; Bang_Hl.frame = 4; } if(HlRand == 6) { //Hair_Hl.frame = 5; Bang_Hl.frame = 5; } if(HlRand == 7) { //Hair_Hl.frame = 6; Bang_Hl.frame = 6; } if(HlRand == 8) { //Hair_Hl.frame = 7; Bang_Hl.frame = 7; } if(HlRand == 9) { //Hair_Hl.frame = 8; Bang_Hl.frame = 8; } if(HlRand == 10) { //Hair_Hl.frame = 9; Bang_Hl.frame = 9; } if(HlRand == 11) { //Hair_Hl.frame = 10; Bang_Hl.frame = 10; } if(HlRand == 12) { //Hair_Hl.frame = 11; Bang_Hl.frame = 11; } var ClothesRand = Math.floor(Math.random()*(12-1+1))+1; if(ClothesRand == 1) { this.Clothes_fnc("tops","Top01",TopsX,TopsY); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 2) { this.Clothes_fnc("tops2","Top02",TopsX2,TopsY2); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 3) { this.Clothes_fnc("tops3","Top03",TopsX3,TopsY3); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 4) { this.Clothes_fnc("tops4","Top04",TopsX4,TopsY4); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 5) { this.Clothes_fnc("tops5","Top05",TopsX5,TopsY5); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 6) { this.Clothes_fnc("tops6","Top06",TopsX6,TopsY6); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 7) { this.Clothes_fnc("dress","Dress01",DressX,DressY); Bottoms.visible = false; } if(ClothesRand == 8) { this.Clothes_fnc("dress2","Dress02",DressX2,DressY2); Bottoms.visible = false; } if(ClothesRand == 9) { this.Clothes_fnc("dress3","Dress03",DressX3,DressY3); Bottoms.visible = false; } if(ClothesRand == 10) { this.Clothes_fnc("dress4","Dress04",DressX4,DressY4); Bottoms.visible = false; } if(ClothesRand == 11) { this.Clothes_fnc("dress5","Dress05",DressX5,DressY5); Bottoms.visible = false; } if(ClothesRand == 12) { this.Clothes_fnc("dress6","Dress06",DressX6,DressY6); Bottoms.visible = false; } var ClothesColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ClothesColorRand == 1){Clothes.frame = 0;} if(ClothesColorRand == 2){Clothes.frame = 1;} if(ClothesColorRand == 3){Clothes.frame = 2;} if(ClothesColorRand == 4){Clothes.frame = 3;} if(ClothesColorRand == 5){Clothes.frame = 4;} if(ClothesColorRand == 6){Clothes.frame = 5;} if(ClothesColorRand == 7){Clothes.frame = 6;} if(ClothesColorRand == 8){Clothes.frame = 7;} if(ClothesColorRand == 9){Clothes.frame = 8;} if(ClothesColorRand == 10){Clothes.frame = 9;} if(ClothesColorRand == 11){Clothes.frame = 10;} if(ClothesColorRand == 12){Clothes.frame = 11;} if(BottomsRand == 1){this.Bottoms_fnc("bottoms","Bottoms01",BottomsX,BottomsY);} if(BottomsRand == 2){this.Bottoms_fnc("bottoms2","Bottoms02",BottomsX2,BottomsY2);} if(BottomsRand == 3){this.Bottoms_fnc("bottoms3","Bottoms03",BottomsX3,BottomsY3);} if(BottomsRand == 4){this.Bottoms_fnc("bottoms4","Bottoms04",BottomsX4,BottomsY4);} if(BottomsRand == 5){this.Bottoms_fnc("bottoms5","Bottoms05",BottomsX5,BottomsY5);} if(BottomsRand == 6){this.Bottoms_fnc("bottoms6","Bottoms06",BottomsX6,BottomsY6);} if(BottomsColorRand == 1){Bottoms.frame = 0;} if(BottomsColorRand == 2){Bottoms.frame = 1;} if(BottomsColorRand == 3){Bottoms.frame = 2;} if(BottomsColorRand == 4){Bottoms.frame = 3;} if(BottomsColorRand == 5){Bottoms.frame = 4;} if(BottomsColorRand == 6){Bottoms.frame = 5;} if(BottomsColorRand == 7){Bottoms.frame = 6;} if(BottomsColorRand == 8){Bottoms.frame = 7;} if(BottomsColorRand == 9){Bottoms.frame = 8;} if(BottomsColorRand == 10){Bottoms.frame = 9;} if(BottomsColorRand == 11){Bottoms.frame = 10;} if(BottomsColorRand == 12){Bottoms.frame = 11;} var SocksRand = Math.floor(Math.random()*(6-1+1))+1; if(SocksRand == 1){this.Socks_fnc("socks","Socks01",SocksX,SocksY);} if(SocksRand == 2){this.Socks_fnc("socks2","Socks02",SocksX2,SocksY2);} if(SocksRand == 3){this.Socks_fnc("socks3","Socks03",SocksX3,SocksY3);} if(SocksRand == 4){this.Socks_fnc("socks4","Socks04",SocksX4,SocksY4);} if(SocksRand == 5){this.Socks_fnc("socks5","Socks05",SocksX5,SocksY5);} if(SocksRand == 6){this.Socks_fnc("socks6","Socks06",SocksX6,SocksY6);} var SocksColorRand = Math.floor(Math.random()*(12-1+1))+1; if(SocksColorRand == 1){Socks.frame = 0;} if(SocksColorRand == 2){Socks.frame = 1;} if(SocksColorRand == 3){Socks.frame = 2;} if(SocksColorRand == 4){Socks.frame = 3;} if(SocksColorRand == 5){Socks.frame = 4;} if(SocksColorRand == 6){Socks.frame = 5;} if(SocksColorRand == 7){Socks.frame = 6;} if(SocksColorRand == 8){Socks.frame = 7;} if(SocksColorRand == 9){Socks.frame = 8;} if(SocksColorRand == 10){Socks.frame = 9;} if(SocksColorRand == 11){Socks.frame = 10;} if(SocksColorRand == 12){Socks.frame = 11;} var ShoesRand = Math.floor(Math.random()*(6-1+1))+1; if(ShoesRand == 1){this.Shoes_fnc("shoes","Shoes01",ShoesX,ShoesY);} if(ShoesRand == 2){this.Shoes_fnc("shoes2","Shoes02",ShoesX2,ShoesY2);} if(ShoesRand == 3){this.Shoes_fnc("shoes3","Shoes03",ShoesX3,ShoesY3);} if(ShoesRand == 4){this.Shoes_fnc("shoes4","Shoes04",ShoesX4,ShoesY4);} if(ShoesRand == 5){this.Shoes_fnc("shoes5","Shoes05",ShoesX5,ShoesY5);} if(ShoesRand == 6){this.Shoes_fnc("shoes6","Shoes06",ShoesX6,ShoesY6);} var ShoesColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ShoesColorRand == 1){Shoes.frame = 0;} if(ShoesColorRand == 2){Shoes.frame = 1;} if(ShoesColorRand == 3){Shoes.frame = 2;} if(ShoesColorRand == 4){Shoes.frame = 3;} if(ShoesColorRand == 5){Shoes.frame = 4;} if(ShoesColorRand == 6){Shoes.frame = 5;} if(ShoesColorRand == 7){Shoes.frame = 6;} if(ShoesColorRand == 8){Shoes.frame = 7;} if(ShoesColorRand == 9){Shoes.frame = 8;} if(ShoesColorRand == 10){Shoes.frame = 9;} if(ShoesColorRand == 11){Shoes.frame = 10;} if(ShoesColorRand == 12){Shoes.frame = 11;} var ExtraRand = Math.floor(Math.random()*(2-1+1))+1; if(ExtraRand == 1) { Extra.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra.frame = 0;} if(ExtraColorRand == 2){Extra.frame = 1;} if(ExtraColorRand == 3){Extra.frame = 2;} if(ExtraColorRand == 4){Extra.frame = 3;} if(ExtraColorRand == 5){Extra.frame = 4;} if(ExtraColorRand == 6){Extra.frame = 5;} if(ExtraColorRand == 7){Extra.frame = 6;} if(ExtraColorRand == 8){Extra.frame = 7;} if(ExtraColorRand == 9){Extra.frame = 8;} if(ExtraColorRand == 10){Extra.frame = 9;} if(ExtraColorRand == 11){Extra.frame = 10;} if(ExtraColorRand == 12){Extra.frame = 11;} } if(ExtraRand == 2 || ExtraRand == 0){Extra.visible = false;} var Extra2Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra2Rand == 1) { Extra2.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra2.frame = 0;} if(ExtraColorRand == 2){Extra2.frame = 1;} if(ExtraColorRand == 3){Extra2.frame = 2;} if(ExtraColorRand == 4){Extra2.frame = 3;} if(ExtraColorRand == 5){Extra2.frame = 4;} if(ExtraColorRand == 6){Extra2.frame = 5;} if(ExtraColorRand == 7){Extra2.frame = 6;} if(ExtraColorRand == 8){Extra2.frame = 7;} if(ExtraColorRand == 9){Extra2.frame = 8;} if(ExtraColorRand == 10){Extra2.frame = 9;} if(ExtraColorRand == 11){Extra2.frame = 10;} if(ExtraColorRand == 12){Extra2.frame = 11;} } if(Extra2Rand == 2 || Extra2Rand == 0){Extra2.visible = false;} var Extra3Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra3Rand == 1) { Extra3.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra3.frame = 0;} if(ExtraColorRand == 2){Extra3.frame = 1;} if(ExtraColorRand == 3){Extra3.frame = 2;} if(ExtraColorRand == 4){Extra3.frame = 3;} if(ExtraColorRand == 5){Extra3.frame = 4;} if(ExtraColorRand == 6){Extra3.frame = 5;} if(ExtraColorRand == 7){Extra3.frame = 6;} if(ExtraColorRand == 8){Extra3.frame = 7;} if(ExtraColorRand == 9){Extra3.frame = 8;} if(ExtraColorRand == 10){Extra3.frame = 9;} if(ExtraColorRand == 11){Extra3.frame = 10;} if(ExtraColorRand == 12){Extra3.frame = 11;} } if(Extra3Rand == 2 || Extra3Rand == 0){Extra3.visible = false;} var Extra4Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra4Rand == 1) { Extra4.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra4.frame = 0;} if(ExtraColorRand == 2){Extra4.frame = 1;} if(ExtraColorRand == 3){Extra4.frame = 2;} if(ExtraColorRand == 4){Extra4.frame = 3;} if(ExtraColorRand == 5){Extra4.frame = 4;} if(ExtraColorRand == 6){Extra4.frame = 5;} if(ExtraColorRand == 7){Extra4.frame = 6;} if(ExtraColorRand == 8){Extra4.frame = 7;} if(ExtraColorRand == 9){Extra4.frame = 8;} if(ExtraColorRand == 10){Extra4.frame = 9;} if(ExtraColorRand == 11){Extra4.frame = 10;} if(ExtraColorRand == 12){Extra4.frame = 11;} } if(Extra4Rand == 2 || Extra4Rand == 0){Extra4.visible = false;} var Extra5Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra5Rand == 1) { Extra5.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra5.frame = 0;} if(ExtraColorRand == 2){Extra5.frame = 1;} if(ExtraColorRand == 3){Extra5.frame = 2;} if(ExtraColorRand == 4){Extra5.frame = 3;} if(ExtraColorRand == 5){Extra5.frame = 4;} if(ExtraColorRand == 6){Extra5.frame = 5;} if(ExtraColorRand == 7){Extra5.frame = 6;} if(ExtraColorRand == 8){Extra5.frame = 7;} if(ExtraColorRand == 9){Extra5.frame = 8;} if(ExtraColorRand == 10){Extra5.frame = 9;} if(ExtraColorRand == 11){Extra5.frame = 10;} if(ExtraColorRand == 12){Extra5.frame = 11;} } if(Extra5Rand == 2 || Extra5Rand == 0){Extra5.visible = false;} var Extra6Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra6Rand == 1) { Extra6.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra6.frame = 0;} if(ExtraColorRand == 2){Extra6.frame = 1;} if(ExtraColorRand == 3){Extra6.frame = 2;} if(ExtraColorRand == 4){Extra6.frame = 3;} if(ExtraColorRand == 5){Extra6.frame = 4;} if(ExtraColorRand == 6){Extra6.frame = 5;} if(ExtraColorRand == 7){Extra6.frame = 6;} if(ExtraColorRand == 8){Extra6.frame = 7;} if(ExtraColorRand == 9){Extra6.frame = 8;} if(ExtraColorRand == 10){Extra6.frame = 9;} if(ExtraColorRand == 11){Extra6.frame = 10;} if(ExtraColorRand == 12){Extra6.frame = 11;} } if(Extra6Rand == 2 || Extra6Rand == 0){Extra6.visible = false;} var LipsRand = Math.floor(Math.random()*(6-1+1))+1; if(LipsRand == 1) { /*this.Lips_fnc("lips","Lips01",LipsX,LipsY); Teeth.visible = false;*/ Lips.frame = 0; Lips.x = LipsX; Lips.y = LipsY; } if(LipsRand == 2) { /*this.Lips_fnc("lips2","Lips02",LipsX2,LipsY2); Teeth.visible = false;*/ Lips.frame = 1; Lips.x = LipsX2; Lips.y = LipsY2; } if(LipsRand == 3) { /*this.Lips_fnc("lips3","Lips03",LipsX3,LipsY3); Teeth.frame = 0; Teeth.x = TeethX3; Teeth.y = TeethY3;*/ Lips.frame = 2; Lips.x = LipsX3; Lips.y = LipsY3; } if(LipsRand == 4) { /*this.Lips_fnc("lips4","Lips04",LipsX4,LipsY4); Teeth.frame = 1; Teeth.x = TeethX4; Teeth.y = TeethY4;*/ Lips.frame = 3; Lips.x = LipsX4; Lips.y = LipsY4; } if(LipsRand == 5) { /*this.Lips_fnc("lips5","Lips05",LipsX5,LipsY5); Teeth.frame = 2; Teeth.x = TeethX5; Teeth.y = TeethY5;*/ Lips.frame = 4; Lips.x = LipsX5; Lips.y = LipsY5; } if(LipsRand == 6) { /*this.Lips_fnc("lips6","Lips06",LipsX6,LipsY6); Teeth.visible = false;*/ Lips.frame = 5; Lips.x = LipsX6; Lips.y = LipsY6; } /*var LipsColorRand = Math.floor(Math.random()*(12-1+1))+1; if(LipsColorRand == 1){Lips.frame = 0;} if(LipsColorRand == 2){Lips.frame = 1;} if(LipsColorRand == 3){Lips.frame = 2;} if(LipsColorRand == 4){Lips.frame = 3;} if(LipsColorRand == 5){Lips.frame = 4;} if(LipsColorRand == 6){Lips.frame = 5;} if(LipsColorRand == 7){Lips.frame = 6;} if(LipsColorRand == 8){Lips.frame = 7;} if(LipsColorRand == 9){Lips.frame = 8;} if(LipsColorRand == 10){Lips.frame = 9;} if(LipsColorRand == 11){Lips.frame = 10;} if(LipsColorRand == 12){Lips.frame = 11;}*/ var EyebrowsRand = Math.floor(Math.random()*(3-1+1))+1; if(EyebrowsRand == 1) { Eyebrows.frame = 0; Eyebrows.x = EyebrowX; Eyebrows.y = EyebrowY; } if(EyebrowsRand == 2) { Eyebrows.frame = 1; Eyebrows.x = EyebrowX2; Eyebrows.y = EyebrowY2; } if(EyebrowsRand == 3) { Eyebrows.frame = 2; Eyebrows.x = EyebrowX3; Eyebrows.y = EyebrowY3; } var SkinColorRand = Math.floor(Math.random()*(12-1+1))+1; if(SkinColorRand == 1) { Body.frame = 0; Head.frame = 0; } if(SkinColorRand == 2) { Body.frame = 1; Head.frame = 1; } if(SkinColorRand == 3) { Body.frame = 2; Head.frame = 2; } if(SkinColorRand == 4) { Body.frame = 3; Head.frame = 3; } if(SkinColorRand == 5) { Body.frame = 4; Head.frame = 4; } if(SkinColorRand == 6) { Body.frame = 5; Head.frame = 5; } if(SkinColorRand == 7) { Body.frame = 6; Head.frame = 6; } if(SkinColorRand == 8) { Body.frame = 7; Head.frame = 7; } if(SkinColorRand == 9) { Body.frame = 8; Head.frame = 8; } if(SkinColorRand == 10) { Body.frame = 9; Head.frame = 9; } if(SkinColorRand == 11) { Body.frame = 10; Head.frame = 10; } if(SkinColorRand == 12) { Body.frame = 11; Head.frame = 11; } }, SortMainGroup_fnc: function() { /*this will remove all the Doll's assets in the Character_Group to make it ready for adding it in again in the Character_Group.*/ Doll_Group.remove(Shadow); Doll_Group.remove(Hair); Doll_Group.remove(Hair_Hl); Doll_Group.remove(Hair_Outline); Doll_Group.remove(Body); Doll_Group.remove(Body_Outline); Doll_Group.remove(Bra); Doll_Group.remove(Panties); Doll_Group.remove(Socks); Doll_Group.remove(Socks_Outline); Doll_Group.remove(Bottoms); Doll_Group.remove(Bottoms_Outline); Doll_Group.remove(Shoes); Doll_Group.remove(Shoes_Outline); Doll_Group.remove(Clothes); Doll_Group.remove(Clothes_Outline); Doll_Group.remove(Head); Doll_Group.remove(Head_Outline); Doll_Group.remove(Eye_Shadow); //Doll_Group.remove(Eyes_White); Doll_Group.remove(Eyes); Doll_Group.remove(Face_Details); Doll_Group.remove(Eyebrows); Doll_Group.remove(Lips); Doll_Group.remove(Lips_Outline); //Doll_Group.remove(Teeth); Doll_Group.remove(Bangs); Doll_Group.remove(Bang_Hl); Doll_Group.remove(Bangs_Outline); Doll_Group.remove(Extra2); Doll_Group.remove(Extra2_Outline); Doll_Group.remove(Extra3); Doll_Group.remove(Extra3_Outline); Doll_Group.remove(Extra4); Doll_Group.remove(Extra4_Outline); Doll_Group.remove(Extra5); Doll_Group.remove(Extra5_Outline); Doll_Group.remove(Extra); Doll_Group.remove(Extra_Outline); Doll_Group.remove(Extra6); Doll_Group.remove(Extra6_Outline); Doll_Group.remove(Tray); Doll_Group.remove(Cake); Doll_Group.remove(Cake_Outline); /*this function will add all the doll's assets again in the Character_Group*/ this.AddToGroup(); }, AddToGroup: function() { /*add all the doll's assets again in the Character_Group so that all the assets are going to be sorted out*/ Doll_Group.add(Shadow); Doll_Group.add(Hair); Doll_Group.add(Hair_Hl); Doll_Group.add(Hair_Outline); Doll_Group.add(Body); Doll_Group.add(Body_Outline); Doll_Group.add(Bra); Doll_Group.add(Panties); Doll_Group.add(Socks); Doll_Group.add(Socks_Outline); Doll_Group.add(Bottoms); Doll_Group.add(Bottoms_Outline); Doll_Group.add(Shoes); Doll_Group.add(Shoes_Outline); Doll_Group.add(Clothes); Doll_Group.add(Clothes_Outline); Doll_Group.add(Head); Doll_Group.add(Head_Outline); Doll_Group.add(Eye_Shadow); //Doll_Group.add(Eyes_White); Doll_Group.add(Eyes); Doll_Group.add(Face_Details); Doll_Group.add(Eyebrows); Doll_Group.add(Lips); Doll_Group.add(Lips_Outline); //Doll_Group.add(Teeth); Doll_Group.add(Bangs); Doll_Group.add(Bang_Hl); Doll_Group.add(Bangs_Outline); Doll_Group.add(Extra2); Doll_Group.add(Extra2_Outline); Doll_Group.add(Extra3); Doll_Group.add(Extra3_Outline); Doll_Group.add(Extra4); Doll_Group.add(Extra4_Outline); Doll_Group.add(Extra5); Doll_Group.add(Extra5_Outline); Doll_Group.add(Extra); Doll_Group.add(Extra_Outline); Doll_Group.add(Extra6); Doll_Group.add(Extra6_Outline); Doll_Group.add(Tray); Doll_Group.add(Cake); Doll_Group.add(Cake_Outline); }, update: function() { }, }