OwlCyberSecurity - MANAGER
Edit File: dressup.js
var dressup = function(game) { } dressup.prototype = { create: function() { /*I added this two variables for you to save some time typing this.world.centerX and this.world.centerY to make the graphics appear in the middle of the screen*/ CenterX = this.world.centerX; CenterY = this.world.centerY; /*hairColor variable is going to be use for letting other functions know what color of the hair the user chose, we set it initially to 0 to avoid confussion*/ hairColor = 0; /*hlColor variable is going to be use for letting other functions know what highlight color of the hair the user chose, we set it initially to 0 to avoid confussion*/ hlColor = 0; /*lipsColor variable is going to be use for letting other functions know what color of the lips the user chose, we set it initially to 0 to avoid confussion*/ lipsColor = 0; /*this is how boolean(true/false) is declared in phaser framework. This framework is very similar to flash as3 that's the reason I'm using it. ;) */ dressOn = false; /*openedMenu variable is going to be use for letting the replay button at the end screen to know what menu is currently opened before we clicked the show button. 1 - HairMenu 2 - hair highlights mennu 3 - eye color menu 4 - eyeshadow menu 5 - lips menu 6 - tops menu 7 - bottoms menu 8 - dress menu 9 - shoes menu 10 - socks menu 11 - extras menu (wings) 12 - skintone menu*/ openedMenu = 1; //add background image Background = this.add.image(-248,-485,"background"); /*you can change the position of each part of the doll by using the posText and add this.debug_fnc(<image>); and then copy the values that will show up in the posText to the X and Y variables that I made. This variables will make making new games on this engine easier because you will input the x and y position just once for a certain graphics and it will automatically change all the x and y position of that graphics. I will make this Extras(wings) an example when editing this engine to be used for a new game:*/ /*you will set the x and y position of every graphics in the variable similar to this v I did this so that you will not going to change thousands of x and y's in this engine*/ ExtrasX = 1010; ExtrasY = 346; //add the Extras(wings) /*change "extras01" to any of the wings graphics that are loaded in the preloader. Example: this v to "extras02" to see if every graphics that are in the same group has the same X and Y position as the first one.*/ Extras = this.add.button(0,0,"extras01",function() { /*this will set the visibility of the graphics, we set it to false so that when the Extras(wings) is clicked, it will change its visibility to false/invisible*/ Extras.visible = false; },this); /*anchor position of the graphics is set at the middle of the graphics, when you set it to (1,1) the anchor position in the graphics will be on the upper right corner of the graphics*/ Extras.anchor.setTo(0.5,0.5); Extras.x = ExtrasX; //we then add the variable ExtrasX in the x position of the Extras graphics Extras.y = ExtrasY; //and add the variable ExtrasY in the y position of the Extras graphics /*uncomment the posText to use it. You can see it at the bottom of this "create" function. To make it easier for you, try using search, then search for posText)*/ //this.debug_fnc(Extras); //<--uncomment it then refresh your browser and you will notice that //her wings is now draggable and when you drop her wings an X and Y //value will be given to you automatically. You will //then copy that value in the "ExtrasX" and "ExtrasY" to be used by //the functions that will change the graphics when you are playing it //set the Hairs X and Y values Hair01X = 1050; //x position for "hair01_0001" up to "hair01_0017" Hair01Y = 423; //y position for "hair01_0001" up to "hair01_0017" Hair02X = 909; //x position for "hair02_0001" up to "hair02_0017" Hair02Y = 515; //y position for "hair02_0001" up to "hair02_0017" Hair03X = 798; //x position for "hair03_0001" up to "hair03_0017" Hair03Y = 283; //y position for "hair03_0001" up to "hair03_0017" Hair04X = 922; //x position for "hair04_0001" up to "hair04_0017" Hair04Y = 623; //y position for "hair04_0001" up to "hair04_0017" Hair05X = 952; //x position for "hair05_0001" up to "hair05_0017" Hair05Y = 227; //y position for "hair05_0001" up to "hair05_0017" Hair06X = 850; //x position for "hair06_0001" up to "hair06_0017" Hair06Y = 553; //y position for "hair06_0001" up to "hair06_0017" //add the hair Hair = this.add.sprite(0,0,"hair01_0010"); //"hair01_0010" is the initial hair we are going //to use. The orange hair. Try playing with it change //"hair01_0010" to "hair02_0010" then change Hair.anchor.setTo(0.5,0.5); Hair.x = Hair01X; //<-- this to Hair02X and Hair.y = Hair01Y; //<-- this to Hair02Y Hair.name = "Hair01"; /*we add a name for some of the graphics to let some functions know what graphics are we using. Example: "hair01_0001" up to "hair01_0017" the name we are going to use is "Hair01", then for "hair02_0001" up to "hair02_0017" is "Hair02". You will see how we're going to use this name later on.*/ //add and set the hair highlights X and Y values HairHl01X = 1046; //x position for "hair_hl01_0001" up to "hair_hl01_0017" HairHl01Y = 412; //y position for "hair_hl01_0001" up to "hair_hl01_0017" HairHl02X = 909; //x position for "hair_hl02_0001" up to "hair_hl02_0017" HairHl02Y = 538; //y position for "hair_hl02_0001" up to "hair_hl02_0017" HairHl03X = 787; //x position for "hair_hl03_0001" up to "hair_hl03_0017" HairHl03Y = 242; //y position for "hair_hl03_0001" up to "hair_hl03_0017" HairHl04X = 917; //x position for "hair_hl04_0001" up to "hair_hl04_0017" HairHl04Y = 593; //y position for "hair_hl04_0001" up to "hair_hl04_0017" HairHl05X = 952; //x position for "hair_hl05_0001" up to "hair_hl05_0017" HairHl05Y = 212; //y position for "hair_hl05_0001" up to "hair_hl05_0017" HairHl06X = 863; //x position for "hair_hl06_0001" up to "hair_hl06_0017" HairHl06Y = 510; //y position for "hair_hl06_0001" up to "hair_hl06_0017" //add the hair highlights Hair_Hl = this.add.sprite(0,0,"hair_hl01_0001"); Hair_Hl.anchor.setTo(0.5,0.5); Hair_Hl.x = HairHl01X; Hair_Hl.y = HairHl01Y; Hair_Hl.visible = false; /*we set it's visibility initialy to false as we don't want to see her hair highlights yet.*/ //set the Body(skintone) X and Y values BodyX = CenterX; BodyY = CenterY; //add the body Body = this.add.sprite(0,0,"body0004"); Body.anchor.setTo(0.5,0.5); Body.x = CenterX; Body.y = CenterY; //add and set the Hit_Box X and Y values /*this Hit_Box is something similar to what we always do in flash. When the object hit it something will be triggered*/ Hit_Box = this.add.sprite(0,0,"hit_box"); Hit_Box.anchor.setTo(0.5,0.5); Hit_Box.x = CenterX; Hit_Box.y = CenterY; Hit_Box.alpha = 0; //alpha is set to 0 (zero) because we only need it for hit testing //add the bra Bra = this.add.sprite(0,0,"bra"); Bra.anchor.setTo(0.5,0.5); Bra.x = 916; Bra.y = 406; //set the Socks X and Y values SocksX = 973; SocksY = 931; //add the Socks Socks = this.add.sprite(0,0,"socks0001"); Socks.anchor.setTo(0.5,0.5); Socks.x = SocksX; Socks.y = SocksY; Socks.visible = false; /*we set it's visibility initialy to false as we don't want to see the socks yet*/ //add the Panty/underware Panty = this.add.sprite(0,0,"panty"); Panty.anchor.setTo(0.5,0.5); Panty.x = 968; Panty.y = 594; //set the Bottoms X and Y values BottomsX = 998; BottomsY = 739; //add the Bottoms Bottoms = this.add.sprite(0,0,"bottoms0001"); Bottoms.anchor.setTo(0.5,0.5); Bottoms.x = BottomsX; Bottoms.y = BottomsY; Bottoms.visible = false; /*we set it's visibility initialy to false as we don't want to see the Bottoms yet*/ //set the Dress and Tops X and Y values DressX = 1188; DressY = 787; TopsX = 970; TopsY = 435; //add the Clothes /*we use this Clothes sprite instead of making a separate sprite for the tops and the dress that will only make the code even longer. And I noticed that the Tops and Dress is not going to be shown at once*/ Clothes = this.add.button(0,0,"dress0001",function() { Clothes.visible = false; /*set the visibility of her bra to true so that when the clothes become invisible, her bra will be shown*/ Bra.visible = true; },this); Clothes.anchor.setTo(0.5,0.5); Clothes.input.pixelPerfectClick = true; Clothes.x = DressX; Clothes.y = DressY; Clothes.name = "Dress01"; /*the name for this sprite is going to be very important for the Clothes_fnc() (Clothes function) code because the name will say to that function what the doll is wearing, is it a Tops or is it a dress and then it will automatically adjusts the X and Y of the Clothes sprite*/ //add the Eyes_White Eyes_White = this.add.sprite(0,0,"eyes_white"); Eyes_White.anchor.setTo(0.5,0.5); Eyes_White.x = 963; Eyes_White.y = 244; //set the Eye_Left X and Y values Eye_LeftX = 931; Eye_LeftY = 246; //add the Eye_Left Eye_Left = this.add.sprite(0,0,"eye_left0008"); /*we set it initially to eye_left0008, the blue eyes. You can change "eye_left0008" if you wanted it to have a different initial color for her left eye*/ Eye_Left.anchor.setTo(0.5,0.5); Eye_Left.x = Eye_LeftX; Eye_Left.y = Eye_LeftY; //set the Eye_Right X and Y values Eye_RightX = 998; Eye_RightY = 243; //add the Eye_Right Eye_Right = this.add.sprite(0,0,"eye_right0008"); /*we set it initially to eye_right0008, the blue eyes. You can change "eye_right0008" if you wanted it to have a different initial color for her right eye*/ Eye_Right.anchor.setTo(0.5,0.5); Eye_Right.x = Eye_RightX; Eye_Right.y = Eye_RightY; //set the Left Eyeshadow X and Y values Eyeshadow_LeftX = 931; Eyeshadow_LeftY = 244; //add the Left Eyeshadow Eyeshadow_Left = this.add.sprite(0,0,"eyeshadow_left01"); Eyeshadow_Left.anchor.setTo(0.5,0.5); Eyeshadow_Left.x = Eyeshadow_LeftX; Eyeshadow_Left.y = Eyeshadow_LeftY; Eyeshadow_Left.visible = false; /*we set it's visibility initialy to false as we don't want to see the Eyeshadow_Left yet*/ //set the Right Eyeshadow X and Y values Eyeshadow_RightX = 1006; Eyeshadow_RightY = 235; //add the Right Eyeshadow Eyeshadow_Right = this.add.sprite(0,0,"eyeshadow_right01"); Eyeshadow_Right.anchor.setTo(0.5,0.5); Eyeshadow_Right.x = Eyeshadow_RightX; Eyeshadow_Right.y = Eyeshadow_RightY; Eyeshadow_Right.visible = false; /*we set it's visibility initialy to false as we don't want to see the Eyeshadow_Right yet*/ //add the Face_Details Face_Details = this.add.sprite(0,0,"face_details"); Face_Details.anchor.setTo(0.5,0.5); Face_Details.x = 961; Face_Details.y = 241; //set the Lips' X and Y values Lips01X = 971; //x position for "lips01_0001" up to "lips01_0009" Lips01Y = 294; //y position for "lips01_0001" up to "lips01_0009" Lips02X = 971; //x position for "lips02_0001" up to "lips02_0009" Lips02Y = 296.6; //y position for "lips02_0001" up to "lips02_0009" Lips03X = 971; //x position for "lips03_0001" up to "lips03_0009" Lips03Y = 299; //y position for "lips03_0001" up to "lips03_0009" Lips04X = 971; //x position for "lips04_0001" up to "lips04_0009" Lips04Y = 292.7; //y position for "lips04_0001" up to "lips04_0009" Lips05X = 971; //x position for "lips05_0001" up to "lips05_0009" Lips05Y = 292; //y position for "lips05_0001" up to "lips05_0009" //add the Lips Lips = this.add.sprite(0,0,"lips01_0006"); Lips.anchor.setTo(0.5,0.5); Lips.x = Lips01X; Lips.y = Lips01Y; Lips.name = "Lips01"; //set the Teeth X and Y values TeethX = 973; TeethY = 303; //add the Teeth Teeth = this.add.sprite(0,0,"teeth01"); Teeth.anchor.setTo(0.5,0.5); Teeth.x = TeethX; Teeth.y = TeethY; //set the Bang X and Y values Bang01X = 963; //x position for "bang01_0001" up to "bang01_0017" Bang01Y = 294; //y position for "bang01_0001" up to "bang01_0017" Bang02X = 964; //x position for "bang02_0001" up to "bang02_0017" Bang02Y = 200; //y position for "bang02_0001" up to "bang02_0017" Bang03X = 1000; //x position for "bang03_0001" up to "bang03_0017" Bang03Y = 276; //y position for "bang03_0001" up to "bang03_0017" Bang04X = 935; //x position for "bang04_0001" up to "bang04_0017" Bang04Y = 285; //y position for "bang04_0001" up to "bang04_0017" Bang05X = 952; //x position for "bang05_0001" up to "bang05_0017" Bang05Y = 166; //y position for "bang05_0001" up to "bang05_0017" Bang06X = 943; //x position for "bang06_0001" up to "bang06_0017" Bang06Y = 283; //y position for "bang06_0001" up to "bang06_0017" //add the Bang Bang = this.add.sprite(0,0,"bang01_0010"); Bang.anchor.setTo(0.5,0.5); Bang.x = Bang01X; Bang.y = Bang01Y; Bang.name = "Bang01"; //set the Bang highlights X and Y values BangHl01X = 956; //x position for "bang_hl01_0001" up to "bang_hl01_0017" BangHl01Y = 207; //y position for "bang_hl01_0001" up to "bang_hl01_0017" BangHl02X = 973; //x position for "bang_hl02_0001" up to "bang_hl02_0017" BangHl02Y = 242; //y position for "bang_hl02_0001" up to "bang_hl02_0017" BangHl03X = 978; //x position for "bang_hl03_0001" up to "bang_hl03_0017" BangHl03Y = 205; //y position for "bang_hl03_0001" up to "bang_hl03_0017" BangHl04X = 984; //x position for "bang_hl04_0001" up to "bang_hl04_0017" BangHl04Y = 172; //y position for "bang_hl04_0001" up to "bang_hl04_0017" BangHl05X = 965; //x position for "bang_hl05_0001" up to "bang_hl05_0017" BangHl05Y = 181; //y position for "bang_hl05_0001" up to "bang_hl05_0017" BangHl06X = 884; //x position for "bang_hl06_0001" up to "bang_hl06_0017" BangHl06Y = 318; //y position for "bang_hl06_0001" up to "bang_hl06_0017" //add the Bang highlights Bang_Hl = this.add.sprite(0,0,"bang_hl01_0001"); Bang_Hl.anchor.setTo(0.5,0.5); Bang_Hl.x = BangHl01X; Bang_Hl.y = BangHl01Y; Bang_Hl.name = "BangHl01" Bang_Hl.visible = false; //set the Shoes X and Y values ShoesX = 1006; ShoesY = 1064; //add the Shoes Shoes = this.add.button(0,0,"shoes0001",function() { Shoes.visible = false; },this); Shoes.anchor.setTo(0.5,0.5); Shoes.input.pixelPerfectClick = true; Shoes.x = ShoesX; Shoes.y = ShoesY; /*and finally, we make a group to store all of the doll's assets (hair,eyes,dress,etc.) and then add all of the doll's assets inside this group so that we can change the doll's size and x and y position easily.*/ Character_Group = this.add.group(); //this.SortMainGroup_fnc(); Character_Group.add(Extras); Character_Group.add(Hair); Character_Group.add(Hair_Hl); Character_Group.add(Body); Character_Group.add(Socks); Character_Group.add(Hit_Box); Character_Group.add(Bra); Character_Group.add(Panty); Character_Group.add(Shoes); Character_Group.add(Bottoms); Character_Group.add(Clothes); Character_Group.add(Eyes_White); Character_Group.add(Eye_Left); Character_Group.add(Eye_Right); Character_Group.add(Eyeshadow_Left); Character_Group.add(Eyeshadow_Right); Character_Group.add(Face_Details); Character_Group.add(Lips); Character_Group.add(Teeth); Character_Group.add(Bang); Character_Group.add(Bang_Hl); /*you can test changing this x or y to see how to move all of the doll's assets at the same time by just editing this single x and y :) */ Character_Group.x = -500; Character_Group.y = 20; //side buttons //add the Pink border first so that it will be shown under the menus Border = this.add.sprite(0,0,"border"); Border.anchor.setTo(0.5,0.5); Border.x = 1437; Border.y = 659; //add the Hair_Btn Hair_Btn = this.add.button(0,0,"hair_btn",function() { openedMenu = 1; /*we made the other menus invisible so that the only thing that will be visible when we click on the Hair_Btn is the Hair_Btn_Group menu*/ Hair_Btn_Group.visible = true; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Hair_Btn.anchor.setTo(0.5,0.5); Hair_Btn.x = 900; Hair_Btn.y = 61; //add the Hair highlights button Hl_Btn = this.add.button(0,0,"hl_btn",function() { openedMenu = 2; /*we made the other menus invisible so that the only thing that will be visible when we click on the Hl_Btn is the Hl_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = true; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Hl_Btn.anchor.setTo(0.5,0.5); Hl_Btn.x = Hair_Btn.x; Hl_Btn.y = Hair_Btn.y + Hair_Btn.height - 8; //add the Eye button Eye_Btn = this.add.button(0,0,"eye_btn",function() { openedMenu = 3; /*we made the other menus invisible so that the only thing that will be visible when we click on the Eye_Btn is the Eye_Color_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = true; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this ScaleDoll function will make the Doll zoom in and will change the x and y position of the doll*/ this.ScaleDoll(); },this,1,0,2); Eye_Btn.anchor.setTo(0.5,0.5); Eye_Btn.x = Hl_Btn.x; Eye_Btn.y = Hl_Btn.y + Hl_Btn.height - 8; //add the Eyeshadow button Eyeshadow_Btn = this.add.button(0,0,"eyeshadow_btn",function()// { openedMenu = 4; /*we made the other menus invisible so that the only thing that will be visible when we click on the Eyeshadow_Btn is the Eyeshadow_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = true; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this ScaleDoll function will make the Doll zoom in and will change the x and y position of the doll*/ this.ScaleDoll(); },this,1,0,2); Eyeshadow_Btn.anchor.setTo(0.5,0.5); Eyeshadow_Btn.x = Eye_Btn.x; Eyeshadow_Btn.y = Eye_Btn.y + Eye_Btn.height - 8; //add the Lips_Btn button Lips_Btn = this.add.button(0,0,"lips_btn",function() { openedMenu = 5; /*we made the other menus invisible so that the only thing that will be visible when we click on the Lips_Btn is the Lips_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = true; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; this.ScaleDoll(); },this,1,0,2); Lips_Btn.anchor.setTo(0.5,0.5); Lips_Btn.x = Eyeshadow_Btn.x; Lips_Btn.y = Eyeshadow_Btn.y + Eyeshadow_Btn.height - 8; //add the Tops_Btn button Tops_Btn = this.add.button(0,0,"tops_btn",function() { openedMenu = 6; /*we made the other menus invisible so that the only thing that will be visible when we click on the Tops_Btn is the Tops_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = true; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Tops_Btn.anchor.setTo(0.5,0.5); Tops_Btn.x = Lips_Btn.x; Tops_Btn.y = Lips_Btn.y + Lips_Btn.height - 8; //add the Bottoms_Btn button Bottoms_Btn = this.add.button(0,0,"bottoms_btn",function() { openedMenu = 7; /*we made the other menus invisible so that the only thing that will be visible when we click on the Bottoms_Btn is the Bottoms_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = true; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Bottoms_Btn.anchor.setTo(0.5,0.5); Bottoms_Btn.x = Tops_Btn.x; Bottoms_Btn.y = Tops_Btn.y + Tops_Btn.height - 8; //add the Dress_Btn button Dress_Btn = this.add.button(0,0,"dress_btn",function() { openedMenu = 8; /*we made the other menus invisible so that the only thing that will be visible when we click on the Dress_Btn is the Dress_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = true; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Dress_Btn.anchor.setTo(0.5,0.5); Dress_Btn.x = Bottoms_Btn.x; Dress_Btn.y = Bottoms_Btn.y + Bottoms_Btn.height - 8; //add the Shoes_Btn button Shoes_Btn = this.add.button(0,0,"shoes_btn",function() { openedMenu = 9; /*we made the other menus invisible so that the only thing that will be visible when we click on the Shoes_Btn is the Shoes_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = true; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Shoes_Btn.anchor.setTo(0.5,0.5); Shoes_Btn.x = Dress_Btn.x; Shoes_Btn.y = Dress_Btn.y + Dress_Btn.height - 8; //add the Socks_Btn button Socks_Btn = this.add.button(0,0,"socks_btn",function() { openedMenu = 10; /*we made the other menus invisible so that the only thing that will be visible when we click on the Socks_Btn is the Socks_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = true; Extras_Group.visible = false; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Socks_Btn.anchor.setTo(0.5,0.5); Socks_Btn.x = Shoes_Btn.x; Socks_Btn.y = Shoes_Btn.y + Shoes_Btn.height - 8; //add the Extra_Btn button Extra_Btn = this.add.button(0,0,"extra_btn",function() { openedMenu = 11; /*we made the other menus invisible so that the only thing that will be visible when we click on the Extra_Btn is the Extras_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = true; Skincolor_Group.visible = false; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Extra_Btn.anchor.setTo(0.5,0.5); Extra_Btn.x = Socks_Btn.x; Extra_Btn.y = Socks_Btn.y + Socks_Btn.height - 8; //add the Skintone_Btn button Skintone_Btn = this.add.button(0,0,"skintone_btn",function() { openedMenu = 12; /*we made the other menus invisible so that the only thing that will be visible when we click on the Skintone_Btn is the Skincolor_Group menu */ Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = true; /*this NormalSize_fnc function will make the Doll's size back to to normal (Zoom out) and will make the x and y position of the doll back to it's original place*/ this.NormalSize_fnc(); },this,1,0,2); Skintone_Btn.anchor.setTo(0.5,0.5); Skintone_Btn.x = Extra_Btn.x; Skintone_Btn.y = Extra_Btn.y + Extra_Btn.height - 8; /*Here is where all the Icons/Menu and it's functions will be added*/ /*when we make a new game for this engine, the only thing we will be editing here are the X and Y positions of the Icons. And as long as the file names of the pngs are the same as the file names of the pngs on this game enigne, we're not going to have a problem implementing a new game on this one. :) */ //Hair_Icons Hair01_Icon = this.add.button(0,0,"hair01_icon",function() { /*we check what hair color we are currently using so that the correct hair color will be shown to us when the Hair_fnc function is called. The Hair_fnc consist of 4 parameters: first parameter - "hair01_0010" will be use for drawing the new sprite that will be shown to us second parameter - is the sprite name that will be use for the hair highlights(I will explain it more later on the Hair_fnc function itself) third and fourth parameters - are the ones we setup a while ago, the X and Ys of the hairs. So that means that you didn't need to write the x and y of the object over and over again when we change the game for this engine. All we need to do is, setup the X and Ys at the begginning of this js file for the new game and that's it.*/ if(hairColor == 0){this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y);} if(hairColor == 1){this.Hair_fnc("hair01_0001","Hair01",Hair01X,Hair01Y);} if(hairColor == 2){this.Hair_fnc("hair01_0002","Hair01",Hair01X,Hair01Y);} if(hairColor == 3){this.Hair_fnc("hair01_0003","Hair01",Hair01X,Hair01Y);} if(hairColor == 4){this.Hair_fnc("hair01_0004","Hair01",Hair01X,Hair01Y);} if(hairColor == 5){this.Hair_fnc("hair01_0005","Hair01",Hair01X,Hair01Y);} if(hairColor == 6){this.Hair_fnc("hair01_0006","Hair01",Hair01X,Hair01Y);} if(hairColor == 7){this.Hair_fnc("hair01_0007","Hair01",Hair01X,Hair01Y);} if(hairColor == 8){this.Hair_fnc("hair01_0008","Hair01",Hair01X,Hair01Y);} if(hairColor == 9){this.Hair_fnc("hair01_0009","Hair01",Hair01X,Hair01Y);} if(hairColor == 10){this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y);} if(hairColor == 11){this.Hair_fnc("hair01_0011","Hair01",Hair01X,Hair01Y);} if(hairColor == 12){this.Hair_fnc("hair01_0012","Hair01",Hair01X,Hair01Y);} if(hairColor == 13){this.Hair_fnc("hair01_0013","Hair01",Hair01X,Hair01Y);} if(hairColor == 14){this.Hair_fnc("hair01_0014","Hair01",Hair01X,Hair01Y);} if(hairColor == 15){this.Hair_fnc("hair01_0015","Hair01",Hair01X,Hair01Y);} if(hairColor == 16){this.Hair_fnc("hair01_0016","Hair01",Hair01X,Hair01Y);} if(hairColor == 17){this.Hair_fnc("hair01_0017","Hair01",Hair01X,Hair01Y);} },this); Hair01_Icon.anchor.setTo(0.5,0.5); /*this will set the clickable area of the buttons in pixel perfect in the graphics itself. Try setting it to false and then click closer to the Hair01_Icon (outside of the graphics) to see it set to false*/ Hair01_Icon.input.pixelPerfectClick = true; Hair01_Icon.x = 1140; //<--change the xs if needed Hair01_Icon.y = 455; //<--change the ys if needed Hair02_Icon = this.add.button(0,0,"hair02_icon",function() { if(hairColor == 0){this.Hair_fnc("hair02_0010","Hair02",Hair02X,Hair02Y);} if(hairColor == 1){this.Hair_fnc("hair02_0001","Hair02",Hair02X,Hair02Y);} if(hairColor == 2){this.Hair_fnc("hair02_0002","Hair02",Hair02X,Hair02Y);} if(hairColor == 3){this.Hair_fnc("hair02_0003","Hair02",Hair02X,Hair02Y);} if(hairColor == 4){this.Hair_fnc("hair02_0004","Hair02",Hair02X,Hair02Y);} if(hairColor == 5){this.Hair_fnc("hair02_0005","Hair02",Hair02X,Hair02Y);} if(hairColor == 6){this.Hair_fnc("hair02_0006","Hair02",Hair02X,Hair02Y);} if(hairColor == 7){this.Hair_fnc("hair02_0007","Hair02",Hair02X,Hair02Y);} if(hairColor == 8){this.Hair_fnc("hair02_0008","Hair02",Hair02X,Hair02Y);} if(hairColor == 9){this.Hair_fnc("hair02_0009","Hair02",Hair02X,Hair02Y);} if(hairColor == 10){this.Hair_fnc("hair02_0010","Hair02",Hair02X,Hair02Y);} if(hairColor == 11){this.Hair_fnc("hair02_0011","Hair02",Hair02X,Hair02Y);} if(hairColor == 12){this.Hair_fnc("hair02_0012","Hair02",Hair02X,Hair02Y);} if(hairColor == 13){this.Hair_fnc("hair02_0013","Hair02",Hair02X,Hair02Y);} if(hairColor == 14){this.Hair_fnc("hair02_0014","Hair02",Hair02X,Hair02Y);} if(hairColor == 15){this.Hair_fnc("hair02_0015","Hair02",Hair02X,Hair02Y);} if(hairColor == 16){this.Hair_fnc("hair02_0016","Hair02",Hair02X,Hair02Y);} if(hairColor == 17){this.Hair_fnc("hair02_0017","Hair02",Hair02X,Hair02Y);} },this); Hair02_Icon.anchor.setTo(0.5,0.5); Hair02_Icon.input.pixelPerfectClick = true; Hair02_Icon.x = 1412; Hair02_Icon.y = 877; Hair03_Icon = this.add.button(0,0,"hair03_icon",function() { if(hairColor == 0){this.Hair_fnc("hair03_0010","Hair03",Hair03X,Hair03Y);} if(hairColor == 1){this.Hair_fnc("hair03_0001","Hair03",Hair03X,Hair03Y);} if(hairColor == 2){this.Hair_fnc("hair03_0002","Hair03",Hair03X,Hair03Y);} if(hairColor == 3){this.Hair_fnc("hair03_0003","Hair03",Hair03X,Hair03Y);} if(hairColor == 4){this.Hair_fnc("hair03_0004","Hair03",Hair03X,Hair03Y);} if(hairColor == 5){this.Hair_fnc("hair03_0005","Hair03",Hair03X,Hair03Y);} if(hairColor == 6){this.Hair_fnc("hair03_0006","Hair03",Hair03X,Hair03Y);} if(hairColor == 7){this.Hair_fnc("hair03_0007","Hair03",Hair03X,Hair03Y);} if(hairColor == 8){this.Hair_fnc("hair03_0008","Hair03",Hair03X,Hair03Y);} if(hairColor == 9){this.Hair_fnc("hair03_0009","Hair03",Hair03X,Hair03Y);} if(hairColor == 10){this.Hair_fnc("hair03_0010","Hair03",Hair03X,Hair03Y);} if(hairColor == 11){this.Hair_fnc("hair03_0011","Hair03",Hair03X,Hair03Y);} if(hairColor == 12){this.Hair_fnc("hair03_0012","Hair03",Hair03X,Hair03Y);} if(hairColor == 13){this.Hair_fnc("hair03_0013","Hair03",Hair03X,Hair03Y);} if(hairColor == 14){this.Hair_fnc("hair03_0014","Hair03",Hair03X,Hair03Y);} if(hairColor == 15){this.Hair_fnc("hair03_0015","Hair03",Hair03X,Hair03Y);} if(hairColor == 16){this.Hair_fnc("hair03_0016","Hair03",Hair03X,Hair03Y);} if(hairColor == 17){this.Hair_fnc("hair03_0017","Hair03",Hair03X,Hair03Y);} },this); Hair03_Icon.anchor.setTo(0.5,0.5); Hair03_Icon.input.pixelPerfectClick = true; Hair03_Icon.x = 1612; Hair03_Icon.y = 414; Hair04_Icon = this.add.button(0,0,"hair04_icon",function() { if(hairColor == 0){this.Hair_fnc("hair04_0010","Hair04",Hair04X,Hair04Y);} if(hairColor == 1){this.Hair_fnc("hair04_0001","Hair04",Hair04X,Hair04Y);} if(hairColor == 2){this.Hair_fnc("hair04_0002","Hair04",Hair04X,Hair04Y);} if(hairColor == 3){this.Hair_fnc("hair04_0003","Hair04",Hair04X,Hair04Y);} if(hairColor == 4){this.Hair_fnc("hair04_0004","Hair04",Hair04X,Hair04Y);} if(hairColor == 5){this.Hair_fnc("hair04_0005","Hair04",Hair04X,Hair04Y);} if(hairColor == 6){this.Hair_fnc("hair04_0006","Hair04",Hair04X,Hair04Y);} if(hairColor == 7){this.Hair_fnc("hair04_0007","Hair04",Hair04X,Hair04Y);} if(hairColor == 8){this.Hair_fnc("hair04_0008","Hair04",Hair04X,Hair04Y);} if(hairColor == 9){this.Hair_fnc("hair04_0009","Hair04",Hair04X,Hair04Y);} if(hairColor == 10){this.Hair_fnc("hair04_0010","Hair04",Hair04X,Hair04Y);} if(hairColor == 11){this.Hair_fnc("hair04_0011","Hair04",Hair04X,Hair04Y);} if(hairColor == 12){this.Hair_fnc("hair04_0012","Hair04",Hair04X,Hair04Y);} if(hairColor == 13){this.Hair_fnc("hair04_0013","Hair04",Hair04X,Hair04Y);} if(hairColor == 14){this.Hair_fnc("hair04_0014","Hair04",Hair04X,Hair04Y);} if(hairColor == 15){this.Hair_fnc("hair04_0015","Hair04",Hair04X,Hair04Y);} if(hairColor == 16){this.Hair_fnc("hair04_0016","Hair04",Hair04X,Hair04Y);} if(hairColor == 17){this.Hair_fnc("hair04_0017","Hair04",Hair04X,Hair04Y);} },this); Hair04_Icon.anchor.setTo(0.5,0.5); Hair04_Icon.input.pixelPerfectClick = true; Hair04_Icon.x = 1667; Hair04_Icon.y = 1038; Hair05_Icon = this.add.button(0,0,"hair05_icon",function() { if(hairColor == 0){this.Hair_fnc("hair05_0010","Hair05",Hair05X,Hair05Y);} if(hairColor == 1){this.Hair_fnc("hair05_0001","Hair05",Hair05X,Hair05Y);} if(hairColor == 2){this.Hair_fnc("hair05_0002","Hair05",Hair05X,Hair05Y);} if(hairColor == 3){this.Hair_fnc("hair05_0003","Hair05",Hair05X,Hair05Y);} if(hairColor == 4){this.Hair_fnc("hair05_0004","Hair05",Hair05X,Hair05Y);} if(hairColor == 5){this.Hair_fnc("hair05_0005","Hair05",Hair05X,Hair05Y);} if(hairColor == 6){this.Hair_fnc("hair05_0006","Hair05",Hair05X,Hair05Y);} if(hairColor == 7){this.Hair_fnc("hair05_0007","Hair05",Hair05X,Hair05Y);} if(hairColor == 8){this.Hair_fnc("hair05_0008","Hair05",Hair05X,Hair05Y);} if(hairColor == 9){this.Hair_fnc("hair05_0009","Hair05",Hair05X,Hair05Y);} if(hairColor == 10){this.Hair_fnc("hair05_0010","Hair05",Hair05X,Hair05Y);} if(hairColor == 11){this.Hair_fnc("hair05_0011","Hair05",Hair05X,Hair05Y);} if(hairColor == 12){this.Hair_fnc("hair05_0012","Hair05",Hair05X,Hair05Y);} if(hairColor == 13){this.Hair_fnc("hair05_0013","Hair05",Hair05X,Hair05Y);} if(hairColor == 14){this.Hair_fnc("hair05_0014","Hair05",Hair05X,Hair05Y);} if(hairColor == 15){this.Hair_fnc("hair05_0015","Hair05",Hair05X,Hair05Y);} if(hairColor == 16){this.Hair_fnc("hair05_0016","Hair05",Hair05X,Hair05Y);} if(hairColor == 17){this.Hair_fnc("hair05_0017","Hair05",Hair05X,Hair05Y);} },this); Hair05_Icon.anchor.setTo(0.5,0.5); Hair05_Icon.input.pixelPerfectClick = true; Hair05_Icon.x = 1427; Hair05_Icon.y = 492; Hair06_Icon = this.add.button(0,0,"hair06_icon",function() { if(hairColor == 0){this.Hair_fnc("hair06_0010","Hair06",Hair06X,Hair06Y);} if(hairColor == 1){this.Hair_fnc("hair06_0001","Hair06",Hair06X,Hair06Y);} if(hairColor == 2){this.Hair_fnc("hair06_0002","Hair06",Hair06X,Hair06Y);} if(hairColor == 3){this.Hair_fnc("hair06_0003","Hair06",Hair06X,Hair06Y);} if(hairColor == 4){this.Hair_fnc("hair06_0004","Hair06",Hair06X,Hair06Y);} if(hairColor == 5){this.Hair_fnc("hair06_0005","Hair06",Hair06X,Hair06Y);} if(hairColor == 6){this.Hair_fnc("hair06_0006","Hair06",Hair06X,Hair06Y);} if(hairColor == 7){this.Hair_fnc("hair06_0007","Hair06",Hair06X,Hair06Y);} if(hairColor == 8){this.Hair_fnc("hair06_0008","Hair06",Hair06X,Hair06Y);} if(hairColor == 9){this.Hair_fnc("hair06_0009","Hair06",Hair06X,Hair06Y);} if(hairColor == 10){this.Hair_fnc("hair06_0010","Hair06",Hair06X,Hair06Y);} if(hairColor == 11){this.Hair_fnc("hair06_0011","Hair06",Hair06X,Hair06Y);} if(hairColor == 12){this.Hair_fnc("hair06_0012","Hair06",Hair06X,Hair06Y);} if(hairColor == 13){this.Hair_fnc("hair06_0013","Hair06",Hair06X,Hair06Y);} if(hairColor == 14){this.Hair_fnc("hair06_0014","Hair06",Hair06X,Hair06Y);} if(hairColor == 15){this.Hair_fnc("hair06_0015","Hair06",Hair06X,Hair06Y);} if(hairColor == 16){this.Hair_fnc("hair06_0016","Hair06",Hair06X,Hair06Y);} if(hairColor == 17){this.Hair_fnc("hair06_0017","Hair06",Hair06X,Hair06Y);} },this); Hair06_Icon.anchor.setTo(0.5,0.5); Hair06_Icon.input.pixelPerfectClick = true; Hair06_Icon.x = 1133; Hair06_Icon.y = 1023; //Bang_Icons Bang01_Icon = this.add.button(0,0,"bang01_icon",function() { /*the Bang_fnc function works similar to the Hair_fnc. It also has those 4 parameters and those 4 parameters are working just the same*/ if(hairColor == 0){this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y);} if(hairColor == 1){this.Bang_fnc("bang01_0001","Bang01",Bang01X,Bang01Y);} if(hairColor == 2){this.Bang_fnc("bang01_0002","Bang01",Bang01X,Bang01Y);} if(hairColor == 3){this.Bang_fnc("bang01_0003","Bang01",Bang01X,Bang01Y);} if(hairColor == 4){this.Bang_fnc("bang01_0004","Bang01",Bang01X,Bang01Y);} if(hairColor == 5){this.Bang_fnc("bang01_0005","Bang01",Bang01X,Bang01Y);} if(hairColor == 6){this.Bang_fnc("bang01_0006","Bang01",Bang01X,Bang01Y);} if(hairColor == 7){this.Bang_fnc("bang01_0007","Bang01",Bang01X,Bang01Y);} if(hairColor == 8){this.Bang_fnc("bang01_0008","Bang01",Bang01X,Bang01Y);} if(hairColor == 9){this.Bang_fnc("bang01_0009","Bang01",Bang01X,Bang01Y);} if(hairColor == 10){this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y);} if(hairColor == 11){this.Bang_fnc("bang01_0011","Bang01",Bang01X,Bang01Y);} if(hairColor == 12){this.Bang_fnc("bang01_0012","Bang01",Bang01X,Bang01Y);} if(hairColor == 13){this.Bang_fnc("bang01_0013","Bang01",Bang01X,Bang01Y);} if(hairColor == 14){this.Bang_fnc("bang01_0014","Bang01",Bang01X,Bang01Y);} if(hairColor == 15){this.Bang_fnc("bang01_0015","Bang01",Bang01X,Bang01Y);} if(hairColor == 16){this.Bang_fnc("bang01_0016","Bang01",Bang01X,Bang01Y);} if(hairColor == 17){this.Bang_fnc("bang01_0017","Bang01",Bang01X,Bang01Y);} },this); Bang01_Icon.anchor.setTo(0.5,0.5); Bang01_Icon.input.pixelPerfectClick = true; Bang01_Icon.x = 1114; Bang01_Icon.y = 408; Bang02_Icon = this.add.button(0,0,"bang02_icon",function() { if(hairColor == 0){this.Bang_fnc("bang02_0010","Bang02",Bang02X,Bang02Y);} if(hairColor == 1){this.Bang_fnc("bang02_0001","Bang02",Bang02X,Bang02Y);} if(hairColor == 2){this.Bang_fnc("bang02_0002","Bang02",Bang02X,Bang02Y);} if(hairColor == 3){this.Bang_fnc("bang02_0003","Bang02",Bang02X,Bang02Y);} if(hairColor == 4){this.Bang_fnc("bang02_0004","Bang02",Bang02X,Bang02Y);} if(hairColor == 5){this.Bang_fnc("bang02_0005","Bang02",Bang02X,Bang02Y);} if(hairColor == 6){this.Bang_fnc("bang02_0006","Bang02",Bang02X,Bang02Y);} if(hairColor == 7){this.Bang_fnc("bang02_0007","Bang02",Bang02X,Bang02Y);} if(hairColor == 8){this.Bang_fnc("bang02_0008","Bang02",Bang02X,Bang02Y);} if(hairColor == 9){this.Bang_fnc("bang02_0009","Bang02",Bang02X,Bang02Y);} if(hairColor == 10){this.Bang_fnc("bang02_0010","Bang02",Bang02X,Bang02Y);} if(hairColor == 11){this.Bang_fnc("bang02_0011","Bang02",Bang02X,Bang02Y);} if(hairColor == 12){this.Bang_fnc("bang02_0012","Bang02",Bang02X,Bang02Y);} if(hairColor == 13){this.Bang_fnc("bang02_0013","Bang02",Bang02X,Bang02Y);} if(hairColor == 14){this.Bang_fnc("bang02_0014","Bang02",Bang02X,Bang02Y);} if(hairColor == 15){this.Bang_fnc("bang02_0015","Bang02",Bang02X,Bang02Y);} if(hairColor == 16){this.Bang_fnc("bang02_0016","Bang02",Bang02X,Bang02Y);} if(hairColor == 17){this.Bang_fnc("bang02_0017","Bang02",Bang02X,Bang02Y);} },this); Bang02_Icon.anchor.setTo(0.5,0.5); Bang02_Icon.input.pixelPerfectClick = true; Bang02_Icon.x = 1445; Bang02_Icon.y = 733; Bang03_Icon = this.add.button(0,0,"bang03_icon",function() { if(hairColor == 0){this.Bang_fnc("bang03_0010","Bang03",Bang03X,Bang03Y);} if(hairColor == 1){this.Bang_fnc("bang03_0001","Bang03",Bang03X,Bang03Y);} if(hairColor == 2){this.Bang_fnc("bang03_0002","Bang03",Bang03X,Bang03Y);} if(hairColor == 3){this.Bang_fnc("bang03_0003","Bang03",Bang03X,Bang03Y);} if(hairColor == 4){this.Bang_fnc("bang03_0004","Bang03",Bang03X,Bang03Y);} if(hairColor == 5){this.Bang_fnc("bang03_0005","Bang03",Bang03X,Bang03Y);} if(hairColor == 6){this.Bang_fnc("bang03_0006","Bang03",Bang03X,Bang03Y);} if(hairColor == 7){this.Bang_fnc("bang03_0007","Bang03",Bang03X,Bang03Y);} if(hairColor == 8){this.Bang_fnc("bang03_0008","Bang03",Bang03X,Bang03Y);} if(hairColor == 9){this.Bang_fnc("bang03_0009","Bang03",Bang03X,Bang03Y);} if(hairColor == 10){this.Bang_fnc("bang03_0010","Bang03",Bang03X,Bang03Y);} if(hairColor == 11){this.Bang_fnc("bang03_0011","Bang03",Bang03X,Bang03Y);} if(hairColor == 12){this.Bang_fnc("bang03_0012","Bang03",Bang03X,Bang03Y);} if(hairColor == 13){this.Bang_fnc("bang03_0013","Bang03",Bang03X,Bang03Y);} if(hairColor == 14){this.Bang_fnc("bang03_0014","Bang03",Bang03X,Bang03Y);} if(hairColor == 15){this.Bang_fnc("bang03_0015","Bang03",Bang03X,Bang03Y);} if(hairColor == 16){this.Bang_fnc("bang03_0016","Bang03",Bang03X,Bang03Y);} if(hairColor == 17){this.Bang_fnc("bang03_0017","Bang03",Bang03X,Bang03Y);} },this); Bang03_Icon.anchor.setTo(0.5,0.5); Bang03_Icon.input.pixelPerfectClick = true; Bang03_Icon.x = 1689; Bang03_Icon.y = 419; Bang04_Icon = this.add.button(0,0,"bang04_icon",function() { if(hairColor == 0){this.Bang_fnc("bang04_0010","Bang04",Bang04X,Bang04Y);} if(hairColor == 1){this.Bang_fnc("bang04_0001","Bang04",Bang04X,Bang04Y);} if(hairColor == 2){this.Bang_fnc("bang04_0002","Bang04",Bang04X,Bang04Y);} if(hairColor == 3){this.Bang_fnc("bang04_0003","Bang04",Bang04X,Bang04Y);} if(hairColor == 4){this.Bang_fnc("bang04_0004","Bang04",Bang04X,Bang04Y);} if(hairColor == 5){this.Bang_fnc("bang04_0005","Bang04",Bang04X,Bang04Y);} if(hairColor == 6){this.Bang_fnc("bang04_0006","Bang04",Bang04X,Bang04Y);} if(hairColor == 7){this.Bang_fnc("bang04_0007","Bang04",Bang04X,Bang04Y);} if(hairColor == 8){this.Bang_fnc("bang04_0008","Bang04",Bang04X,Bang04Y);} if(hairColor == 9){this.Bang_fnc("bang04_0009","Bang04",Bang04X,Bang04Y);} if(hairColor == 10){this.Bang_fnc("bang04_0010","Bang04",Bang04X,Bang04Y);} if(hairColor == 11){this.Bang_fnc("bang04_0011","Bang04",Bang04X,Bang04Y);} if(hairColor == 12){this.Bang_fnc("bang04_0012","Bang04",Bang04X,Bang04Y);} if(hairColor == 13){this.Bang_fnc("bang04_0013","Bang04",Bang04X,Bang04Y);} if(hairColor == 14){this.Bang_fnc("bang04_0014","Bang04",Bang04X,Bang04Y);} if(hairColor == 15){this.Bang_fnc("bang04_0015","Bang04",Bang04X,Bang04Y);} if(hairColor == 16){this.Bang_fnc("bang04_0016","Bang04",Bang04X,Bang04Y);} if(hairColor == 17){this.Bang_fnc("bang04_0017","Bang04",Bang04X,Bang04Y);} },this); Bang04_Icon.anchor.setTo(0.5,0.5); Bang04_Icon.input.pixelPerfectClick = true; Bang04_Icon.x = 1676; Bang04_Icon.y = 906; Bang05_Icon = this.add.button(0,0,"bang05_icon",function() { if(hairColor == 0){this.Bang_fnc("bang05_0010","Bang05",Bang05X,Bang05Y);} if(hairColor == 1){this.Bang_fnc("bang05_0001","Bang05",Bang05X,Bang05Y);} if(hairColor == 2){this.Bang_fnc("bang05_0002","Bang05",Bang05X,Bang05Y);} if(hairColor == 3){this.Bang_fnc("bang05_0003","Bang05",Bang05X,Bang05Y);} if(hairColor == 4){this.Bang_fnc("bang05_0004","Bang05",Bang05X,Bang05Y);} if(hairColor == 5){this.Bang_fnc("bang05_0005","Bang05",Bang05X,Bang05Y);} if(hairColor == 6){this.Bang_fnc("bang05_0006","Bang05",Bang05X,Bang05Y);} if(hairColor == 7){this.Bang_fnc("bang05_0007","Bang05",Bang05X,Bang05Y);} if(hairColor == 8){this.Bang_fnc("bang05_0008","Bang05",Bang05X,Bang05Y);} if(hairColor == 9){this.Bang_fnc("bang05_0009","Bang05",Bang05X,Bang05Y);} if(hairColor == 10){this.Bang_fnc("bang05_0010","Bang05",Bang05X,Bang05Y);} if(hairColor == 11){this.Bang_fnc("bang05_0011","Bang05",Bang05X,Bang05Y);} if(hairColor == 12){this.Bang_fnc("bang05_0012","Bang05",Bang05X,Bang05Y);} if(hairColor == 13){this.Bang_fnc("bang05_0013","Bang05",Bang05X,Bang05Y);} if(hairColor == 14){this.Bang_fnc("bang05_0014","Bang05",Bang05X,Bang05Y);} if(hairColor == 15){this.Bang_fnc("bang05_0015","Bang05",Bang05X,Bang05Y);} if(hairColor == 16){this.Bang_fnc("bang05_0016","Bang05",Bang05X,Bang05Y);} if(hairColor == 17){this.Bang_fnc("bang05_0017","Bang05",Bang05X,Bang05Y);} },this); Bang05_Icon.anchor.setTo(0.5,0.5); Bang05_Icon.input.pixelPerfectClick = true; Bang05_Icon.x = 1430; Bang05_Icon.y = 458; Bang06_Icon = this.add.button(0,0,"bang06_icon",function() { if(hairColor == 0){this.Bang_fnc("bang06_0010","Bang06",Bang06X,Bang06Y);} if(hairColor == 1){this.Bang_fnc("bang06_0001","Bang06",Bang06X,Bang06Y);} if(hairColor == 2){this.Bang_fnc("bang06_0002","Bang06",Bang06X,Bang06Y);} if(hairColor == 3){this.Bang_fnc("bang06_0003","Bang06",Bang06X,Bang06Y);} if(hairColor == 4){this.Bang_fnc("bang06_0004","Bang06",Bang06X,Bang06Y);} if(hairColor == 5){this.Bang_fnc("bang06_0005","Bang06",Bang06X,Bang06Y);} if(hairColor == 6){this.Bang_fnc("bang06_0006","Bang06",Bang06X,Bang06Y);} if(hairColor == 7){this.Bang_fnc("bang06_0007","Bang06",Bang06X,Bang06Y);} if(hairColor == 8){this.Bang_fnc("bang06_0008","Bang06",Bang06X,Bang06Y);} if(hairColor == 9){this.Bang_fnc("bang06_0009","Bang06",Bang06X,Bang06Y);} if(hairColor == 10){this.Bang_fnc("bang06_0010","Bang06",Bang06X,Bang06Y);} if(hairColor == 11){this.Bang_fnc("bang06_0011","Bang06",Bang06X,Bang06Y);} if(hairColor == 12){this.Bang_fnc("bang06_0012","Bang06",Bang06X,Bang06Y);} if(hairColor == 13){this.Bang_fnc("bang06_0013","Bang06",Bang06X,Bang06Y);} if(hairColor == 14){this.Bang_fnc("bang06_0014","Bang06",Bang06X,Bang06Y);} if(hairColor == 15){this.Bang_fnc("bang06_0015","Bang06",Bang06X,Bang06Y);} if(hairColor == 16){this.Bang_fnc("bang06_0016","Bang06",Bang06X,Bang06Y);} if(hairColor == 17){this.Bang_fnc("bang06_0017","Bang06",Bang06X,Bang06Y);} },this); Bang06_Icon.anchor.setTo(0.5,0.5); Bang06_Icon.input.pixelPerfectClick = true; Bang06_Icon.x = 1167; Bang06_Icon.y = 906; //Hair_Color /*for the hair color we're going to use 2 functions. One is for the Bang Color and the second one is for the Hair Color*/ Hair_Color_01 = this.add.button(0,0,"hair_color_01",function() { hairColor = 1; /*we check what is the name of the Bang we are currently using. If it is similar to this ("Bang01" or whatever is in there) then we will call the BangColor_fnc function. we only have 4 parameters for this function because we are not going to make a hit testing. But IT is still similar to the Icons we just setup. 1st parameter: key that will be used for making the new sprite 2nd parameter: Bang name 3rd and 4th parameter: X and Y of the Bang Take note of the 1st to 4th parameter as it changes from 0 to 6 depending on what graphics are we going to use. For example: for bang01_xxxx, the name should be "Bang01" and then use the Bang01X and Bang01Y. Then bang02_xxxx, the name should be "Bang02" and then use Bang02X and Bang02Y and so on.*/ if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0001","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0001","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0001","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0001","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0001","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0001","Bang06",Bang06X,Bang06Y);} /*Hair is similar to the Bang*/ if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0001","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0001","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0001","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0001","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0001","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0001","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_01.anchor.setTo(0.5,0.5); Hair_Color_01.x = 1836; Hair_Color_01.y = 231; Hair_Color_02 = this.add.button(0,0,"hair_color_02",function() { hairColor = 2; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0002","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0002","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0002","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0002","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0002","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0002","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0002","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0002","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0002","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0002","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0002","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0002","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_02.anchor.setTo(0.5,0.5); Hair_Color_02.x = Hair_Color_01.x; /*this will automatically assign an x depending on what x position we are going to give for Hair_Color_01.x*/ Hair_Color_02.y = Hair_Color_01.y + Hair_Color_01.height - 12; /*this will automatically assign an y depending on what x position we are going to give for Hair_Color_01.y plus the height of the Hair_Color01 minus 12.*/ Hair_Color_03 = this.add.button(0,0,"hair_color_03",function() { hairColor = 3; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0003","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0003","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0003","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0003","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0003","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0003","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0003","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0003","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0003","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0003","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0003","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0003","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_03.anchor.setTo(0.5,0.5); Hair_Color_03.x = Hair_Color_02.x; Hair_Color_03.y = Hair_Color_02.y + Hair_Color_02.height - 12; Hair_Color_04 = this.add.button(0,0,"hair_color_04",function() { hairColor = 4; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0004","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0004","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0004","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0004","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0004","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0004","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0004","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0004","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0004","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0004","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0004","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0004","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_04.anchor.setTo(0.5,0.5); Hair_Color_04.x = Hair_Color_03.x; Hair_Color_04.y = Hair_Color_03.y + Hair_Color_03.height - 12; Hair_Color_05 = this.add.button(0,0,"hair_color_05",function() { hairColor = 5; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0005","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0005","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0005","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0005","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0005","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0005","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0005","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0005","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0005","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0005","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0005","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0005","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_05.anchor.setTo(0.5,0.5); Hair_Color_05.x = Hair_Color_04.x; Hair_Color_05.y = Hair_Color_04.y + Hair_Color_04.height - 12; Hair_Color_06 = this.add.button(0,0,"hair_color_06",function() { hairColor = 6; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0006","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0006","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0006","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0006","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0006","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0006","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0006","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0006","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0006","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0006","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0006","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0006","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_06.anchor.setTo(0.5,0.5); Hair_Color_06.x = Hair_Color_05.x; Hair_Color_06.y = Hair_Color_05.y + Hair_Color_05.height - 12; Hair_Color_07 = this.add.button(0,0,"hair_color_07",function() { hairColor = 7; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0007","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0007","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0007","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0007","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0007","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0007","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0007","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0007","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0007","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0007","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0007","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0007","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_07.anchor.setTo(0.5,0.5); Hair_Color_07.x = Hair_Color_06.x; Hair_Color_07.y = Hair_Color_06.y + Hair_Color_06.height - 12; Hair_Color_08 = this.add.button(0,0,"hair_color_08",function() { hairColor = 8; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0008","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0008","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0008","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0008","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0008","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0008","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0008","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0008","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0008","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0008","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0008","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0008","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_08.anchor.setTo(0.5,0.5); Hair_Color_08.x = Hair_Color_07.x; Hair_Color_08.y = Hair_Color_07.y + Hair_Color_07.height - 12; Hair_Color_09 = this.add.button(0,0,"hair_color_09",function() { hairColor = 9; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0009","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0009","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0009","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0009","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0009","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0009","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0009","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0009","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0009","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0009","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0009","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0009","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_09.anchor.setTo(0.5,0.5); Hair_Color_09.x = Hair_Color_08.x; Hair_Color_09.y = Hair_Color_08.y + Hair_Color_08.height - 12; Hair_Color_10 = this.add.button(0,0,"hair_color_10",function() { hairColor = 10; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0010","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0010","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0010","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0010","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0010","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0010","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0010","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0010","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0010","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0010","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0010","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0010","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_10.anchor.setTo(0.5,0.5); Hair_Color_10.x = Hair_Color_09.x; Hair_Color_10.y = Hair_Color_09.y + Hair_Color_09.height - 12; Hair_Color_11 = this.add.button(0,0,"hair_color_11",function() { hairColor = 11; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0011","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0011","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0011","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0011","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0011","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0011","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0011","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0011","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0011","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0011","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0011","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0011","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_11.anchor.setTo(0.5,0.5); Hair_Color_11.x = Hair_Color_10.x; Hair_Color_11.y = Hair_Color_10.y + Hair_Color_10.height - 12; Hair_Color_12 = this.add.button(0,0,"hair_color_12",function() { hairColor = 12; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0012","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0012","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0012","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0012","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0012","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0012","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0012","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0012","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0012","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0012","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0012","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0012","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_12.anchor.setTo(0.5,0.5); Hair_Color_12.x = Hair_Color_11.x; Hair_Color_12.y = Hair_Color_11.y + Hair_Color_11.height - 12; Hair_Color_13 = this.add.button(0,0,"hair_color_13",function() { hairColor = 13; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0013","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0013","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0013","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0013","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0013","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0013","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0013","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0013","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0013","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0013","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0013","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0013","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_13.anchor.setTo(0.5,0.5); Hair_Color_13.x = Hair_Color_12.x; Hair_Color_13.y = Hair_Color_12.y + Hair_Color_12.height - 12; Hair_Color_14 = this.add.button(0,0,"hair_color_14",function() { hairColor = 14; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0014","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0014","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0014","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0014","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0014","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0014","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0014","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0014","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0014","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0014","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0014","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0014","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_14.anchor.setTo(0.5,0.5); Hair_Color_14.x = Hair_Color_13.x; Hair_Color_14.y = Hair_Color_13.y + Hair_Color_13.height - 12; Hair_Color_15 = this.add.button(0,0,"hair_color_15",function() { hairColor = 15; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0015","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0015","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0015","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0015","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0015","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0015","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0015","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0015","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0015","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0015","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0015","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0015","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_15.anchor.setTo(0.5,0.5); Hair_Color_15.x = Hair_Color_14.x; Hair_Color_15.y = Hair_Color_14.y + Hair_Color_14.height - 12; Hair_Color_16 = this.add.button(0,0,"hair_color_16",function() { hairColor = 16; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0016","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0016","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0016","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0016","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0016","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0016","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0016","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0016","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0016","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0016","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0016","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0016","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_16.anchor.setTo(0.5,0.5); Hair_Color_16.x = Hair_Color_15.x; Hair_Color_16.y = Hair_Color_15.y + Hair_Color_15.height - 12; Hair_Color_17 = this.add.button(0,0,"hair_color_17",function() { hairColor = 17; if(Bang.name == "Bang01"){this.BangColor_fnc("bang01_0017","Bang01",Bang01X,Bang01Y);} if(Bang.name == "Bang02"){this.BangColor_fnc("bang02_0017","Bang02",Bang02X,Bang02Y);} if(Bang.name == "Bang03"){this.BangColor_fnc("bang03_0017","Bang03",Bang03X,Bang03Y);} if(Bang.name == "Bang04"){this.BangColor_fnc("bang04_0017","Bang04",Bang04X,Bang04Y);} if(Bang.name == "Bang05"){this.BangColor_fnc("bang05_0017","Bang05",Bang05X,Bang05Y);} if(Bang.name == "Bang06"){this.BangColor_fnc("bang06_0017","Bang06",Bang06X,Bang06Y);} if(Hair.name == "Hair01"){this.HairColor_fnc("hair01_0017","Hair01",Hair01X,Hair01Y);} if(Hair.name == "Hair02"){this.HairColor_fnc("hair02_0017","Hair02",Hair02X,Hair02Y);} if(Hair.name == "Hair03"){this.HairColor_fnc("hair03_0017","Hair03",Hair03X,Hair03Y);} if(Hair.name == "Hair04"){this.HairColor_fnc("hair04_0017","Hair04",Hair04X,Hair04Y);} if(Hair.name == "Hair05"){this.HairColor_fnc("hair05_0017","Hair05",Hair05X,Hair05Y);} if(Hair.name == "Hair06"){this.HairColor_fnc("hair06_0017","Hair06",Hair06X,Hair06Y);} },this,1,0,0); Hair_Color_17.anchor.setTo(0.5,0.5); Hair_Color_17.x = Hair_Color_16.x; Hair_Color_17.y = Hair_Color_16.y + Hair_Color_16.height - 12; /*and finally we add all of the Icons and color pickers in a group called Hair_Btn_Group. This is going to be handy when we click on the menu buttons, we can easily hide all the icons with just one code which is Hair_Btn_Group.visible = false;*/ Hair_Btn_Group = this.add.group(); Hair_Btn_Group.add(Hair01_Icon); Hair_Btn_Group.add(Hair02_Icon); Hair_Btn_Group.add(Hair03_Icon); Hair_Btn_Group.add(Hair04_Icon); Hair_Btn_Group.add(Hair05_Icon); Hair_Btn_Group.add(Hair06_Icon); Hair_Btn_Group.add(Bang01_Icon); Hair_Btn_Group.add(Bang02_Icon); Hair_Btn_Group.add(Bang03_Icon); Hair_Btn_Group.add(Bang04_Icon); Hair_Btn_Group.add(Bang05_Icon); Hair_Btn_Group.add(Bang06_Icon); Hair_Btn_Group.add(Hair_Color_01); Hair_Btn_Group.add(Hair_Color_02); Hair_Btn_Group.add(Hair_Color_03); Hair_Btn_Group.add(Hair_Color_04); Hair_Btn_Group.add(Hair_Color_05); Hair_Btn_Group.add(Hair_Color_06); Hair_Btn_Group.add(Hair_Color_07); Hair_Btn_Group.add(Hair_Color_08); Hair_Btn_Group.add(Hair_Color_09); Hair_Btn_Group.add(Hair_Color_10); Hair_Btn_Group.add(Hair_Color_11); Hair_Btn_Group.add(Hair_Color_12); Hair_Btn_Group.add(Hair_Color_13); Hair_Btn_Group.add(Hair_Color_14); Hair_Btn_Group.add(Hair_Color_15); Hair_Btn_Group.add(Hair_Color_16); Hair_Btn_Group.add(Hair_Color_17); //Hl_Color_Icon Hl_Color01_Icon = this.add.button(0,0,"hl_color01_icon",function() { hlColor = 1; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0001","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0001","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0001","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0001","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0001","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0001","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0001","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0001","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0001","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0001","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0001","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0001","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color01_Icon.anchor.setTo(0.5,0.5); Hl_Color01_Icon.x = 1184; Hl_Color01_Icon.y = 324; Hl_Color02_Icon = this.add.button(0,0,"hl_color02_icon",function() { hlColor = 2; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0002","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0002","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0002","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0002","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0002","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0002","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0002","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0002","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0002","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0002","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0002","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0002","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color02_Icon.anchor.setTo(0.5,0.5); Hl_Color02_Icon.x = Hl_Color01_Icon.x + Hl_Color01_Icon.width + 70; Hl_Color02_Icon.y = Hl_Color01_Icon.y; Hl_Color03_Icon = this.add.button(0,0,"hl_color03_icon",function() { hlColor = 3; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0003","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0003","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0003","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0003","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0003","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0003","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0003","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0003","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0003","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0003","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0003","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0003","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color03_Icon.anchor.setTo(0.5,0.5); Hl_Color03_Icon.x = Hl_Color02_Icon.x + Hl_Color02_Icon.width + 70; Hl_Color03_Icon.y = Hl_Color02_Icon.y; Hl_Color04_Icon = this.add.button(0,0,"hl_color04_icon",function() { hlColor = 4; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0004","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0004","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0004","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0004","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0004","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0004","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0004","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0004","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0004","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0004","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0004","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0004","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color04_Icon.anchor.setTo(0.5,0.5); Hl_Color04_Icon.x = Hl_Color03_Icon.x + Hl_Color03_Icon.width + 70; Hl_Color04_Icon.y = Hl_Color03_Icon.y; Hl_Color05_Icon = this.add.button(0,0,"hl_color05_icon",function() { hlColor = 5; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0005","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0005","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0005","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0005","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0005","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0005","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0005","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0005","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0005","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0005","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0005","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0005","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color05_Icon.anchor.setTo(0.5,0.5); Hl_Color05_Icon.x = Hl_Color01_Icon.x; Hl_Color05_Icon.y = Hl_Color01_Icon.y + Hl_Color01_Icon.height * 2; Hl_Color06_Icon = this.add.button(0,0,"hl_color06_icon",function() { hlColor = 6; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0006","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0006","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0006","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0006","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0006","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0006","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0006","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0006","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0006","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0006","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0006","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0006","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color06_Icon.anchor.setTo(0.5,0.5); Hl_Color06_Icon.x = Hl_Color05_Icon.x + Hl_Color05_Icon.width + 70; Hl_Color06_Icon.y = Hl_Color05_Icon.y; Hl_Color07_Icon = this.add.button(0,0,"hl_color07_icon",function() { hlColor = 7; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0007","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0007","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0007","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0007","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0007","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0007","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0007","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0007","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0007","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0007","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0007","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0007","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color07_Icon.anchor.setTo(0.5,0.5); Hl_Color07_Icon.x = Hl_Color06_Icon.x + Hl_Color06_Icon.width + 70; Hl_Color07_Icon.y = Hl_Color06_Icon.y; Hl_Color08_Icon = this.add.button(0,0,"hl_color08_icon",function() { hlColor = 8; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0008","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0008","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0008","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0008","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0008","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0008","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0008","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0008","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0008","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0008","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0008","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0008","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color08_Icon.anchor.setTo(0.5,0.5); Hl_Color08_Icon.x = Hl_Color07_Icon.x + Hl_Color07_Icon.width + 70; Hl_Color08_Icon.y = Hl_Color07_Icon.y; Hl_Color09_Icon = this.add.button(0,0,"hl_color09_icon",function() { hlColor = 9; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0009","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0009","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0009","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0009","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0009","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0009","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0009","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0009","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0009","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0009","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0009","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0009","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color09_Icon.anchor.setTo(0.5,0.5); Hl_Color09_Icon.x = Hl_Color05_Icon.x; Hl_Color09_Icon.y = Hl_Color05_Icon.y + Hl_Color05_Icon.height * 2; Hl_Color10_Icon = this.add.button(0,0,"hl_color10_icon",function() { hlColor = 10; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0010","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0010","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0010","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0010","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0010","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0010","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0010","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0010","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0010","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0010","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0010","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0010","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color10_Icon.anchor.setTo(0.5,0.5); Hl_Color10_Icon.x = Hl_Color09_Icon.x + Hl_Color09_Icon.width + 70; Hl_Color10_Icon.y = Hl_Color09_Icon.y; Hl_Color11_Icon = this.add.button(0,0,"hl_color11_icon",function() { hlColor = 11; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0011","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0011","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0011","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0011","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0011","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0011","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0011","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0011","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0011","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0011","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0011","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0011","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color11_Icon.anchor.setTo(0.5,0.5); Hl_Color11_Icon.x = Hl_Color10_Icon.x + Hl_Color10_Icon.width + 70; Hl_Color11_Icon.y = Hl_Color10_Icon.y; Hl_Color12_Icon = this.add.button(0,0,"hl_color12_icon",function() { hlColor = 12; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0012","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0012","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0012","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0012","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0012","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0012","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0012","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0012","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0012","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0012","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0012","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0012","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color12_Icon.anchor.setTo(0.5,0.5); Hl_Color12_Icon.x = Hl_Color11_Icon.x + Hl_Color11_Icon.width + 70; Hl_Color12_Icon.y = Hl_Color11_Icon.y; Hl_Color13_Icon = this.add.button(0,0,"hl_color13_icon",function() { hlColor = 13; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0013","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0013","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0013","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0013","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0013","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0013","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0013","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0013","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0013","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0013","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0013","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0013","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color13_Icon.anchor.setTo(0.5,0.5); Hl_Color13_Icon.x = Hl_Color09_Icon.x; Hl_Color13_Icon.y = Hl_Color09_Icon.y + Hl_Color09_Icon.height * 2; Hl_Color14_Icon = this.add.button(0,0,"hl_color14_icon",function() { hlColor = 14; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0014","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0014","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0014","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0014","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0014","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0014","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0014","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0014","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0014","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0014","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0014","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0014","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color14_Icon.anchor.setTo(0.5,0.5); Hl_Color14_Icon.x = Hl_Color13_Icon.x + Hl_Color13_Icon.width + 25; Hl_Color14_Icon.y = Hl_Color13_Icon.y; Hl_Color15_Icon = this.add.button(0,0,"hl_color15_icon",function() { hlColor = 15; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0015","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0015","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0015","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0015","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0015","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0015","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0015","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0015","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0015","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0015","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0015","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0015","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color15_Icon.anchor.setTo(0.5,0.5); Hl_Color15_Icon.x = Hl_Color14_Icon.x + Hl_Color14_Icon.width + 25; Hl_Color15_Icon.y = Hl_Color14_Icon.y; Hl_Color16_Icon = this.add.button(0,0,"hl_color16_icon",function() { hlColor = 16; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0016","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0016","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0016","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0016","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0016","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0016","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0016","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0016","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0016","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0016","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0016","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0016","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color16_Icon.anchor.setTo(0.5,0.5); Hl_Color16_Icon.x = Hl_Color15_Icon.x + Hl_Color15_Icon.width + 25; Hl_Color16_Icon.y = Hl_Color15_Icon.y; Hl_Color17_Icon = this.add.button(0,0,"hl_color17_icon",function() { hlColor = 17; if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0017","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0017","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0017","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0017","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0017","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0017","HairHl06",HairHl06X,HairHl06Y);} Hair_Hl.visible = true; if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0017","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0017","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0017","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0017","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0017","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0017","BangHl06",BangHl06X,BangHl06Y);} Bang_Hl.visible = true; },this); Hl_Color17_Icon.anchor.setTo(0.5,0.5); Hl_Color17_Icon.x = Hl_Color16_Icon.x + Hl_Color16_Icon.width + 25; Hl_Color17_Icon.y = Hl_Color16_Icon.y; Delete_Hl_Color = this.add.button(0,0,"delete_color",function() { Bang_Hl.visible = false; Hair_Hl.visible = false; },this,1,0,0); Delete_Hl_Color.anchor.setTo(0.5,0.5); Delete_Hl_Color.x = 1374; Delete_Hl_Color.y = 1151; Add_Hl_Color = this.add.button(0,0,"add_color",function() { Bang_Hl.visible = true; Hair_Hl.visible = true; },this,1,0,0); Add_Hl_Color.anchor.setTo(0.5,0.5); Add_Hl_Color.x = 1530; Add_Hl_Color.y = 1151; Hl_Group = this.add.group(); Hl_Group.add(Hl_Color01_Icon); Hl_Group.add(Hl_Color02_Icon); Hl_Group.add(Hl_Color03_Icon); Hl_Group.add(Hl_Color04_Icon); Hl_Group.add(Hl_Color05_Icon); Hl_Group.add(Hl_Color06_Icon); Hl_Group.add(Hl_Color07_Icon); Hl_Group.add(Hl_Color08_Icon); Hl_Group.add(Hl_Color09_Icon); Hl_Group.add(Hl_Color10_Icon); Hl_Group.add(Hl_Color11_Icon); Hl_Group.add(Hl_Color12_Icon); Hl_Group.add(Hl_Color13_Icon); Hl_Group.add(Hl_Color14_Icon); Hl_Group.add(Hl_Color15_Icon); Hl_Group.add(Hl_Color16_Icon); Hl_Group.add(Hl_Color17_Icon); Hl_Group.add(Delete_Hl_Color); Hl_Group.add(Add_Hl_Color); Hl_Group.visible = false; //Eye_Color_Icon Eye_Color01_Icon = this.add.button(0,0,"eye_color01_icon",function() { /*Eye_fnc function has 6 parameters. 1st parameter: key that we will use to make the new left eye sprite 2nd and 3rd parameters: Left eye X and Y 4th parameter: key that we will use to make the new right eye sprite 5th and 6th parameters Right eye X and Y*/ this.Eye_fnc("eye_left0001",Eye_LeftX,Eye_LeftY,"eye_right0001",Eye_RightX,Eye_RightY); },this); Eye_Color01_Icon.anchor.setTo(0.5,0.5); Eye_Color01_Icon.x = 1145; Eye_Color01_Icon.y = 382; Eye_Color02_Icon = this.add.button(0,0,"eye_color02_icon",function() { this.Eye_fnc("eye_left0002",Eye_LeftX,Eye_LeftY,"eye_right0002",Eye_RightX,Eye_RightY); },this); Eye_Color02_Icon.anchor.setTo(0.5,0.5); Eye_Color02_Icon.x = Eye_Color01_Icon.x + Eye_Color01_Icon.width + 150; Eye_Color02_Icon.y = Eye_Color01_Icon.y; Eye_Color03_Icon = this.add.button(0,0,"eye_color03_icon",function() { this.Eye_fnc("eye_left0003",Eye_LeftX,Eye_LeftY,"eye_right0003",Eye_RightX,Eye_RightY); },this); Eye_Color03_Icon.anchor.setTo(0.5,0.5); Eye_Color03_Icon.x = Eye_Color02_Icon.x + Eye_Color02_Icon.width + 150; Eye_Color03_Icon.y = Eye_Color02_Icon.y; Eye_Color04_Icon = this.add.button(0,0,"eye_color04_icon",function() { this.Eye_fnc("eye_left0004",Eye_LeftX,Eye_LeftY,"eye_right0004",Eye_RightX,Eye_RightY); },this); Eye_Color04_Icon.anchor.setTo(0.5,0.5); Eye_Color04_Icon.x = Eye_Color01_Icon.x; Eye_Color04_Icon.y = Eye_Color01_Icon.y + Eye_Color01_Icon.height * 2 + 50; Eye_Color05_Icon = this.add.button(0,0,"eye_color05_icon",function() { this.Eye_fnc("eye_left0005",Eye_LeftX,Eye_LeftY,"eye_right0005",Eye_RightX,Eye_RightY); },this); Eye_Color05_Icon.anchor.setTo(0.5,0.5); Eye_Color05_Icon.x = Eye_Color04_Icon.x + Eye_Color04_Icon.width + 150; Eye_Color05_Icon.y = Eye_Color04_Icon.y; Eye_Color06_Icon = this.add.button(0,0,"eye_color06_icon",function() { this.Eye_fnc("eye_left0006",Eye_LeftX,Eye_LeftY,"eye_right0006",Eye_RightX,Eye_RightY); },this); Eye_Color06_Icon.anchor.setTo(0.5,0.5); Eye_Color06_Icon.x = Eye_Color05_Icon.x + Eye_Color05_Icon.width + 150; Eye_Color06_Icon.y = Eye_Color05_Icon.y; Eye_Color07_Icon = this.add.button(0,0,"eye_color07_icon",function() { this.Eye_fnc("eye_left0007",Eye_LeftX,Eye_LeftY,"eye_right0007",Eye_RightX,Eye_RightY); },this); Eye_Color07_Icon.anchor.setTo(0.5,0.5); Eye_Color07_Icon.x = Eye_Color04_Icon.x; Eye_Color07_Icon.y = Eye_Color04_Icon.y + Eye_Color04_Icon.height * 2 + 50; Eye_Color08_Icon = this.add.button(0,0,"eye_color08_icon",function() { this.Eye_fnc("eye_left0008",Eye_LeftX,Eye_LeftY,"eye_right0008",Eye_RightX,Eye_RightY); },this); Eye_Color08_Icon.anchor.setTo(0.5,0.5); Eye_Color08_Icon.x = Eye_Color07_Icon.x + Eye_Color07_Icon.width + 150; Eye_Color08_Icon.y = Eye_Color07_Icon.y; Eye_Color09_Icon = this.add.button(0,0,"eye_color09_icon",function() { this.Eye_fnc("eye_left0009",Eye_LeftX,Eye_LeftY,"eye_right0009",Eye_RightX,Eye_RightY); },this); Eye_Color09_Icon.anchor.setTo(0.5,0.5); Eye_Color09_Icon.x = Eye_Color08_Icon.x + Eye_Color08_Icon.width + 150; Eye_Color09_Icon.y = Eye_Color08_Icon.y; /*finally, we add all the Eye Color Icon in a group called Eye_Color_Group*/ Eye_Color_Group = this.add.group(); Eye_Color_Group.add(Eye_Color01_Icon); Eye_Color_Group.add(Eye_Color02_Icon); Eye_Color_Group.add(Eye_Color03_Icon); Eye_Color_Group.add(Eye_Color04_Icon); Eye_Color_Group.add(Eye_Color05_Icon); Eye_Color_Group.add(Eye_Color06_Icon); Eye_Color_Group.add(Eye_Color07_Icon); Eye_Color_Group.add(Eye_Color08_Icon); Eye_Color_Group.add(Eye_Color09_Icon); /*we initially set its visibility to false, because if we don't, you will see two menus when you start the game. You can try it by commenting this code out. :) */ Eye_Color_Group.visible = false; //Eyeshadow_Icon Eyeshadow01_Icon = this.add.button(0,0,"eyeshadow01_icon",function() { /*the Eyeshadow_fnc function is similar to the Eye_fnc function. It also has 6 parameters which contains the key and variables to make the left and right eyeshadow*/ this.Eyeshadow_fnc("eyeshadow_left01",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right01",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow01_Icon.anchor.setTo(0.5,0.5); Eyeshadow01_Icon.x = 1119; Eyeshadow01_Icon.y = 387; Eyeshadow02_Icon = this.add.button(0,0,"eyeshadow02_icon",function() { this.Eyeshadow_fnc("eyeshadow_left02",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right02",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow02_Icon.anchor.setTo(0.5,0.5); Eyeshadow02_Icon.x = Eyeshadow01_Icon.x + Eyeshadow01_Icon.width + 110; Eyeshadow02_Icon.y = Eyeshadow01_Icon.y; Eyeshadow03_Icon = this.add.button(0,0,"eyeshadow03_icon",function() { this.Eyeshadow_fnc("eyeshadow_left03",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right03",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow03_Icon.anchor.setTo(0.5,0.5); Eyeshadow03_Icon.x = Eyeshadow02_Icon.x + Eyeshadow02_Icon.width + 110; Eyeshadow03_Icon.y = Eyeshadow02_Icon.y; Eyeshadow04_Icon = this.add.button(0,0,"eyeshadow04_icon",function() { this.Eyeshadow_fnc("eyeshadow_left04",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right04",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow04_Icon.anchor.setTo(0.5,0.5); Eyeshadow04_Icon.x = Eyeshadow01_Icon.x; Eyeshadow04_Icon.y = Eyeshadow01_Icon.y + Eyeshadow02_Icon.height + 150; Eyeshadow05_Icon = this.add.button(0,0,"eyeshadow05_icon",function() { this.Eyeshadow_fnc("eyeshadow_left05",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right05",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow05_Icon.anchor.setTo(0.5,0.5); Eyeshadow05_Icon.x = Eyeshadow04_Icon.x + Eyeshadow04_Icon.width + 110; Eyeshadow05_Icon.y = Eyeshadow04_Icon.y; Eyeshadow06_Icon = this.add.button(0,0,"eyeshadow06_icon",function() { this.Eyeshadow_fnc("eyeshadow_left06",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right06",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow06_Icon.anchor.setTo(0.5,0.5); Eyeshadow06_Icon.x = Eyeshadow05_Icon.x + Eyeshadow05_Icon.width + 110; Eyeshadow06_Icon.y = Eyeshadow05_Icon.y; Eyeshadow07_Icon = this.add.button(0,0,"eyeshadow07_icon",function() { this.Eyeshadow_fnc("eyeshadow_left07",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right07",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow07_Icon.anchor.setTo(0.5,0.5); Eyeshadow07_Icon.x = Eyeshadow04_Icon.x; Eyeshadow07_Icon.y = Eyeshadow04_Icon.y + Eyeshadow04_Icon.height + 150; Eyeshadow08_Icon = this.add.button(0,0,"eyeshadow08_icon",function() { this.Eyeshadow_fnc("eyeshadow_left08",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right08",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow08_Icon.anchor.setTo(0.5,0.5); Eyeshadow08_Icon.x = Eyeshadow07_Icon.x + Eyeshadow07_Icon.width + 110; Eyeshadow08_Icon.y = Eyeshadow07_Icon.y; Eyeshadow09_Icon = this.add.button(0,0,"eyeshadow09_icon",function() { this.Eyeshadow_fnc("eyeshadow_left09",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right09",Eyeshadow_RightX,Eyeshadow_RightY); },this); Eyeshadow09_Icon.anchor.setTo(0.5,0.5); Eyeshadow09_Icon.x = Eyeshadow08_Icon.x + Eyeshadow08_Icon.width + 110; Eyeshadow09_Icon.y = Eyeshadow08_Icon.y; //this is the X icon at the bottom of the Eyeshadow menu Delete_Eyeshadow = this.add.button(0,0,"delete_color",function() { //make the left and right eyeshadows invisible Eyeshadow_Left.visible = false; Eyeshadow_Right.visible = false; },this,1,0,0); Delete_Eyeshadow.anchor.setTo(0.5,0.5); Delete_Eyeshadow.x = 1374; Delete_Eyeshadow.y = 1165; //this is the check icon at the bottom of the Eyeshadow menu Add_Eyeshadow = this.add.button(0,0,"add_color",function() { //make the left and right eyeshadow visible Eyeshadow_Left.visible = true; Eyeshadow_Right.visible = true; },this,1,0,0); Add_Eyeshadow.anchor.setTo(0.5,0.5); Add_Eyeshadow.x = 1530; Add_Eyeshadow.y = 1165; /*finally, we add the Icons in a group called Eyeshadow_Group*/ Eyeshadow_Group = this.add.group(); Eyeshadow_Group.add(Eyeshadow01_Icon); Eyeshadow_Group.add(Eyeshadow02_Icon); Eyeshadow_Group.add(Eyeshadow03_Icon); Eyeshadow_Group.add(Eyeshadow04_Icon); Eyeshadow_Group.add(Eyeshadow05_Icon); Eyeshadow_Group.add(Eyeshadow06_Icon); Eyeshadow_Group.add(Eyeshadow07_Icon); Eyeshadow_Group.add(Eyeshadow08_Icon); Eyeshadow_Group.add(Eyeshadow09_Icon); Eyeshadow_Group.add(Delete_Eyeshadow); Eyeshadow_Group.add(Add_Eyeshadow); Eyeshadow_Group.visible = false; //make it's initial visibility to invisible //Lips_Icon Lips01_Icon = this.add.button(0,0,"lips01_icon",function() { /*Lips_fnc function has 6 parameters: 1st parameter: key to make the new Lips sprite 2nd parameter: Lips name 3rd and 4th parameters: Lips X and Y 5th parameter: boolean that will say if the lips has a teeth or not (true or false) 6th parameter: key to make the new Teeth (if the boolean is true, it will make a new teeth sprite. Otherwise, it will not make a teeth and we can set it to null)*/ if(lipsColor == 0){this.Lips_fnc("lips01_0006","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 1){this.Lips_fnc("lips01_0001","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 2){this.Lips_fnc("lips01_0002","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 3){this.Lips_fnc("lips01_0003","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 4){this.Lips_fnc("lips01_0004","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 5){this.Lips_fnc("lips01_0005","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 6){this.Lips_fnc("lips01_0006","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 7){this.Lips_fnc("lips01_0007","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 8){this.Lips_fnc("lips01_0008","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(lipsColor == 9){this.Lips_fnc("lips01_0009","Lips01",Lips01X,Lips01Y,true,"teeth01");} },this); Lips01_Icon.anchor.setTo(0.5,0.5); Lips01_Icon.x = 1153; Lips01_Icon.y = 341; Lips04_Icon = this.add.button(0,0,"lips04_icon",function() { if(lipsColor == 0){this.Lips_fnc("lips04_0006","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 1){this.Lips_fnc("lips04_0001","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 2){this.Lips_fnc("lips04_0002","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 3){this.Lips_fnc("lips04_0003","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 4){this.Lips_fnc("lips04_0004","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 5){this.Lips_fnc("lips04_0005","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 6){this.Lips_fnc("lips04_0006","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 7){this.Lips_fnc("lips04_0007","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 8){this.Lips_fnc("lips04_0008","Lips04",Lips04X,Lips04Y,false,null);} if(lipsColor == 9){this.Lips_fnc("lips04_0009","Lips04",Lips04X,Lips04Y,false,null);} },this); Lips04_Icon.anchor.setTo(0.5,0.5); Lips04_Icon.x = Lips01_Icon.x; Lips04_Icon.y = Lips01_Icon.y + Lips01_Icon.height + 50; Lips02_Icon = this.add.button(0,0,"lips02_icon",function() { if(lipsColor == 0){this.Lips_fnc("lips02_0006","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 1){this.Lips_fnc("lips02_0001","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 2){this.Lips_fnc("lips02_0002","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 3){this.Lips_fnc("lips02_0003","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 4){this.Lips_fnc("lips02_0004","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 5){this.Lips_fnc("lips02_0005","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 6){this.Lips_fnc("lips02_0006","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 7){this.Lips_fnc("lips02_0007","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 8){this.Lips_fnc("lips02_0008","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(lipsColor == 9){this.Lips_fnc("lips02_0009","Lips02",Lips02X,Lips02Y,true,"teeth02");} },this); Lips02_Icon.anchor.setTo(0.5,0.5); Lips02_Icon.x = Lips04_Icon.x; Lips02_Icon.y = Lips04_Icon.y + Lips04_Icon.height + 70; Lips03_Icon = this.add.button(0,0,"lips03_icon",function() { if(lipsColor == 0){this.Lips_fnc("lips03_0006","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 1){this.Lips_fnc("lips03_0001","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 2){this.Lips_fnc("lips03_0002","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 3){this.Lips_fnc("lips03_0003","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 4){this.Lips_fnc("lips03_0004","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 5){this.Lips_fnc("lips03_0005","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 6){this.Lips_fnc("lips03_0006","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 7){this.Lips_fnc("lips03_0007","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 8){this.Lips_fnc("lips03_0008","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(lipsColor == 9){this.Lips_fnc("lips03_0009","Lips03",Lips03X,Lips03Y,true,"teeth03");} },this); Lips03_Icon.anchor.setTo(0.5,0.5); Lips03_Icon.x = Lips02_Icon.x; Lips03_Icon.y = Lips02_Icon.y + Lips02_Icon.height + 60; Lips05_Icon = this.add.button(0,0,"lips05_icon",function() { /*this is the Lips_fnc function example that doesn't have a teeth. You can see that we set the 5th parameter to false that will say to the Lips_fnc to not make a teeth. So, that means we're not going to use the 6th parameter which is the key for the teeth, that's why we set it to null*/ if(lipsColor == 0){this.Lips_fnc("lips05_0006","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 1){this.Lips_fnc("lips05_0001","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 2){this.Lips_fnc("lips05_0002","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 3){this.Lips_fnc("lips05_0003","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 4){this.Lips_fnc("lips05_0004","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 5){this.Lips_fnc("lips05_0005","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 6){this.Lips_fnc("lips05_0006","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 7){this.Lips_fnc("lips05_0007","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 8){this.Lips_fnc("lips05_0008","Lips05",Lips05X,Lips05Y,false,null);} if(lipsColor == 9){this.Lips_fnc("lips05_0009","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips05_Icon.anchor.setTo(0.5,0.5); Lips05_Icon.x = Lips03_Icon.x; Lips05_Icon.y = Lips03_Icon.y + Lips03_Icon.height; Lips_Color01 = this.add.button(0,0,"lips_color01",function() { lipsColor = 1; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0001","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0001","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0001","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0001","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0001","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color01.anchor.setTo(0.5,0.5); Lips_Color01.x = 1421; Lips_Color01.y = 411; Lips_Color02 = this.add.button(0,0,"lips_color02",function() { lipsColor = 2; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0002","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0002","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0002","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0002","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0002","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color02.anchor.setTo(0.5,0.5); Lips_Color02.x = Lips_Color01.x + Lips_Color01.width + 125; Lips_Color02.y = Lips_Color01.y; Lips_Color03 = this.add.button(0,0,"lips_color03",function() { lipsColor = 3; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0003","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0003","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0003","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0003","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0003","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color03.anchor.setTo(0.5,0.5); Lips_Color03.x = Lips_Color02.x + Lips_Color02.width + 125; Lips_Color03.y = Lips_Color02.y; Lips_Color04 = this.add.button(0,0,"lips_color04",function() { lipsColor = 4; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0004","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0004","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0004","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0004","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0004","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color04.anchor.setTo(0.5,0.5); Lips_Color04.x = Lips_Color01.x; Lips_Color04.y = Lips_Color01.y + Lips_Color01.height + 60; Lips_Color05 = this.add.button(0,0,"lips_color05",function() { lipsColor = 5; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0005","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0005","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0005","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0005","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0005","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color05.anchor.setTo(0.5,0.5); Lips_Color05.x = Lips_Color04.x + Lips_Color04.width + 125; Lips_Color05.y = Lips_Color04.y; Lips_Color06 = this.add.button(0,0,"lips_color06",function() { lipsColor = 6; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0006","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0006","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0006","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0006","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0006","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color06.anchor.setTo(0.5,0.5); Lips_Color06.x = Lips_Color05.x + Lips_Color05.width + 125; Lips_Color06.y = Lips_Color05.y; Lips_Color07 = this.add.button(0,0,"lips_color07",function() { lipsColor = 7; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0007","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0007","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0007","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0007","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0007","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color07.anchor.setTo(0.5,0.5); Lips_Color07.x = Lips_Color04.x; Lips_Color07.y = Lips_Color04.y + Lips_Color04.height + 60; Lips_Color08 = this.add.button(0,0,"lips_color08",function() { lipsColor = 8; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0008","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0008","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0008","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0008","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0008","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color08.anchor.setTo(0.5,0.5); Lips_Color08.x = Lips_Color07.x + Lips_Color07.width + 125; Lips_Color08.y = Lips_Color07.y; Lips_Color09 = this.add.button(0,0,"lips_color09",function() { lipsColor = 9; if(Lips.name == "Lips01"){this.Lips_fnc("lips01_0009","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(Lips.name == "Lips02"){this.Lips_fnc("lips02_0009","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(Lips.name == "Lips03"){this.Lips_fnc("lips03_0009","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(Lips.name == "Lips04"){this.Lips_fnc("lips04_0009","Lips04",Lips04X,Lips04Y,false,null);} if(Lips.name == "Lips05"){this.Lips_fnc("lips05_0009","Lips05",Lips05X,Lips05Y,false,null);} },this); Lips_Color09.anchor.setTo(0.5,0.5); Lips_Color09.x = Lips_Color08.x + Lips_Color08.width + 125; Lips_Color09.y = Lips_Color08.y; /*finally, we add the Lips Icons and Colors to the Lips_Group*/ Lips_Group = this.add.group(); Lips_Group.add(Lips01_Icon); Lips_Group.add(Lips02_Icon); Lips_Group.add(Lips03_Icon); Lips_Group.add(Lips04_Icon); Lips_Group.add(Lips05_Icon); Lips_Group.add(Lips_Color01); Lips_Group.add(Lips_Color02); Lips_Group.add(Lips_Color03); Lips_Group.add(Lips_Color04); Lips_Group.add(Lips_Color05); Lips_Group.add(Lips_Color06); Lips_Group.add(Lips_Color07); Lips_Group.add(Lips_Color08); Lips_Group.add(Lips_Color09); Lips_Group.visible = false; //Tops_Icon Top01_Icon = this.add.button(0,0,"top01_icon",function() { this.Clothes_fnc("tops0001","Top01",TopsX,TopsY); },this); Top01_Icon.anchor.setTo(0.5,0.5); Top01_Icon.input.pixelPerfectClick = true; Top01_Icon.x = 1075; Top01_Icon.y = 335; Top02_Icon = this.add.button(0,0,"top02_icon",function() { this.Clothes_fnc("tops0002","Top02",TopsX,TopsY); },this); Top02_Icon.anchor.setTo(0.5,0.5); Top02_Icon.input.pixelPerfectClick = true; Top02_Icon.x = Top01_Icon.x + Top01_Icon.width + 68; Top02_Icon.y = Top01_Icon.y; Top03_Icon = this.add.button(0,0,"top03_icon",function() { this.Clothes_fnc("tops0003","Top03",TopsX,TopsY); },this); Top03_Icon.anchor.setTo(0.5,0.5); Top03_Icon.input.pixelPerfectClick = true; Top03_Icon.x = Top02_Icon.x + Top02_Icon.width + 68; Top03_Icon.y = Top02_Icon.y; Top04_Icon = this.add.button(0,0,"top04_icon",function() { this.Clothes_fnc("tops0004","Top04",TopsX,TopsY); },this); Top04_Icon.anchor.setTo(0.5,0.5); Top04_Icon.input.pixelPerfectClick = true; Top04_Icon.x = Top03_Icon.x + Top03_Icon.width + 68; Top04_Icon.y = Top03_Icon.y; Top05_Icon = this.add.button(0,0,"top05_icon",function() { this.Clothes_fnc("tops0005","Top05",TopsX,TopsY); },this); Top05_Icon.anchor.setTo(0.5,0.5); Top05_Icon.input.pixelPerfectClick = true; Top05_Icon.x = Top04_Icon.x + Top04_Icon.width + 68; Top05_Icon.y = Top04_Icon.y; Top06_Icon = this.add.button(0,0,"top06_icon",function() { this.Clothes_fnc("tops0006","Top06",TopsX,TopsY); },this); Top06_Icon.anchor.setTo(0.5,0.5); Top06_Icon.input.pixelPerfectClick = true; Top06_Icon.x = Top01_Icon.x - 22; Top06_Icon.y = Top01_Icon.y + Top01_Icon.height + 65; Top07_Icon = this.add.button(0,0,"top07_icon",function() { this.Clothes_fnc("tops0007","Top07",TopsX,TopsY); },this); Top07_Icon.anchor.setTo(0.5,0.5); Top07_Icon.input.pixelPerfectClick = true; Top07_Icon.x = Top06_Icon.x + Top06_Icon.width + 105; Top07_Icon.y = Top06_Icon.y; Top08_Icon = this.add.button(0,0,"top08_icon",function() { this.Clothes_fnc("tops0008","Top08",TopsX,TopsY); },this); Top08_Icon.anchor.setTo(0.5,0.5); Top08_Icon.input.pixelPerfectClick = true; Top08_Icon.x = Top07_Icon.x + Top07_Icon.width + 105; Top08_Icon.y = Top07_Icon.y; Top09_Icon = this.add.button(0,0,"top09_icon",function() { this.Clothes_fnc("tops0009","Top09",TopsX,TopsY); },this); Top09_Icon.anchor.setTo(0.5,0.5); Top09_Icon.input.pixelPerfectClick = true; Top09_Icon.x = Top08_Icon.x + Top08_Icon.width + 105; Top09_Icon.y = Top08_Icon.y; Top10_Icon = this.add.button(0,0,"top10_icon",function() { this.Clothes_fnc("tops0010","Top10",TopsX,TopsY); },this); Top10_Icon.anchor.setTo(0.5,0.5); Top10_Icon.input.pixelPerfectClick = true; Top10_Icon.x = Top09_Icon.x + Top09_Icon.width + 105; Top10_Icon.y = Top09_Icon.y; Top11_Icon = this.add.button(0,0,"top11_icon",function() { this.Clothes_fnc("tops0011","Top11",TopsX,TopsY); },this); Top11_Icon.anchor.setTo(0.5,0.5); Top11_Icon.input.pixelPerfectClick = true; Top11_Icon.x = Top06_Icon.x + 20; Top11_Icon.y = Top06_Icon.y + Top06_Icon.height + 40; Top12_Icon = this.add.button(0,0,"top12_icon",function() { this.Clothes_fnc("tops0012","Top12",TopsX,TopsY); },this); Top12_Icon.anchor.setTo(0.5,0.5); Top12_Icon.input.pixelPerfectClick = true; Top12_Icon.x = Top11_Icon.x + Top11_Icon.width + 75; Top12_Icon.y = Top11_Icon.y; Top13_Icon = this.add.button(0,0,"top13_icon",function() { this.Clothes_fnc("tops0013","Top13",TopsX,TopsY); },this); Top13_Icon.anchor.setTo(0.5,0.5); Top13_Icon.input.pixelPerfectClick = true; Top13_Icon.x = Top12_Icon.x + Top12_Icon.width + 75; Top13_Icon.y = Top12_Icon.y; Top14_Icon = this.add.button(0,0,"top14_icon",function() { this.Clothes_fnc("tops0014","Top14",TopsX,TopsY); },this); Top14_Icon.anchor.setTo(0.5,0.5); Top14_Icon.input.pixelPerfectClick = true; Top14_Icon.x = Top13_Icon.x + Top13_Icon.width + 75; Top14_Icon.y = Top13_Icon.y; Top15_Icon = this.add.button(0,0,"top15_icon",function() { this.Clothes_fnc("tops0015","Top15",TopsX,TopsY); },this); Top15_Icon.anchor.setTo(0.5,0.5); Top15_Icon.input.pixelPerfectClick = true; Top15_Icon.x = Top14_Icon.x + Top14_Icon.width + 75; Top15_Icon.y = Top14_Icon.y; Top16_Icon = this.add.button(0,0,"top16_icon",function() { this.Clothes_fnc("tops0016","Top16",TopsX,TopsY); },this); Top16_Icon.anchor.setTo(0.5,0.5); Top16_Icon.input.pixelPerfectClick = true; Top16_Icon.x = Top11_Icon.x - 17; Top16_Icon.y = Top11_Icon.y + Top11_Icon.height + 40; Top17_Icon = this.add.button(0,0,"top17_icon",function() { this.Clothes_fnc("tops0017","Top17",TopsX,TopsY); },this); Top17_Icon.anchor.setTo(0.5,0.5); Top17_Icon.input.pixelPerfectClick = true; Top17_Icon.x = Top16_Icon.x + Top16_Icon.width + 122; Top17_Icon.y = Top16_Icon.y; Top18_Icon = this.add.button(0,0,"top18_icon",function() { this.Clothes_fnc("tops0018","Top18",TopsX,TopsY); },this); Top18_Icon.anchor.setTo(0.5,0.5); Top18_Icon.input.pixelPerfectClick = true; Top18_Icon.x = Top17_Icon.x + Top17_Icon.width + 122; Top18_Icon.y = Top17_Icon.y; Top19_Icon = this.add.button(0,0,"top19_icon",function() { this.Clothes_fnc("tops0019","Top19",TopsX,TopsY); },this); Top19_Icon.anchor.setTo(0.5,0.5); Top19_Icon.input.pixelPerfectClick = true; Top19_Icon.x = Top18_Icon.x + Top18_Icon.width + 122; Top19_Icon.y = Top18_Icon.y; Top20_Icon = this.add.button(0,0,"top20_icon",function() { this.Clothes_fnc("tops0020","Top20",TopsX,TopsY); },this); Top20_Icon.anchor.setTo(0.5,0.5); Top20_Icon.input.pixelPerfectClick = true; Top20_Icon.x = Top19_Icon.x + Top19_Icon.width + 122; Top20_Icon.y = Top19_Icon.y; Top21_Icon = this.add.button(0,0,"top21_icon",function() { this.Clothes_fnc("tops0021","Top21",TopsX,TopsY); },this); Top21_Icon.anchor.setTo(0.5,0.5); Top21_Icon.input.pixelPerfectClick = true; Top21_Icon.x = Top16_Icon.x + 20; Top21_Icon.y = Top16_Icon.y + Top16_Icon.height + 80; Top22_Icon = this.add.button(0,0,"top22_icon",function() { this.Clothes_fnc("tops0022","Top22",TopsX,TopsY); },this); Top22_Icon.anchor.setTo(0.5,0.5); Top22_Icon.input.pixelPerfectClick = true; Top22_Icon.x = Top21_Icon.x + Top21_Icon.width + 70; Top22_Icon.y = Top21_Icon.y; Top23_Icon = this.add.button(0,0,"top23_icon",function() { this.Clothes_fnc("tops0023","Top23",TopsX,TopsY); },this); Top23_Icon.anchor.setTo(0.5,0.5); Top23_Icon.input.pixelPerfectClick = true; Top23_Icon.x = Top22_Icon.x + Top22_Icon.width + 70; Top23_Icon.y = Top22_Icon.y; Top24_Icon = this.add.button(0,0,"top24_icon",function() { this.Clothes_fnc("tops0024","Top24",TopsX,TopsY); },this); Top24_Icon.anchor.setTo(0.5,0.5); Top24_Icon.input.pixelPerfectClick = true; Top24_Icon.x = Top23_Icon.x + Top23_Icon.width + 70; Top24_Icon.y = Top23_Icon.y; Top25_Icon = this.add.button(0,0,"top25_icon",function() { this.Clothes_fnc("tops0025","Top25",TopsX,TopsY); },this); Top25_Icon.anchor.setTo(0.5,0.5); Top25_Icon.input.pixelPerfectClick = true; Top25_Icon.x = Top24_Icon.x + Top24_Icon.width + 70; Top25_Icon.y = Top24_Icon.y; Top26_Icon = this.add.button(0,0,"top26_icon",function() { this.Clothes_fnc("tops0026","Top26",TopsX,TopsY); },this); Top26_Icon.anchor.setTo(0.5,0.5); Top26_Icon.input.pixelPerfectClick = true; Top26_Icon.x = Top21_Icon.x + 10; Top26_Icon.y = Top21_Icon.y + Top21_Icon.height + 40; Top27_Icon = this.add.button(0,0,"top27_icon",function() { this.Clothes_fnc("tops0027","Top27",TopsX,TopsY); },this); Top27_Icon.anchor.setTo(0.5,0.5); Top27_Icon.input.pixelPerfectClick = true; Top27_Icon.x = Top26_Icon.x + Top26_Icon.width + 70; Top27_Icon.y = Top26_Icon.y; Top28_Icon = this.add.button(0,0,"top28_icon",function() { this.Clothes_fnc("tops0028","Top28",TopsX,TopsY); },this); Top28_Icon.anchor.setTo(0.5,0.5); Top28_Icon.input.pixelPerfectClick = true; Top28_Icon.x = Top27_Icon.x + Top27_Icon.width + 70; Top28_Icon.y = Top27_Icon.y; Top29_Icon = this.add.button(0,0,"top29_icon",function() { this.Clothes_fnc("tops0029","Top29",TopsX,TopsY); },this); Top29_Icon.anchor.setTo(0.5,0.5); Top29_Icon.input.pixelPerfectClick = true; Top29_Icon.x = Top28_Icon.x + Top28_Icon.width + 70; Top29_Icon.y = Top28_Icon.y; Top30_Icon = this.add.button(0,0,"top30_icon",function() { this.Clothes_fnc("tops0030","Top30",TopsX,TopsY); },this); Top30_Icon.anchor.setTo(0.5,0.5); Top30_Icon.input.pixelPerfectClick = true; Top30_Icon.x = Top29_Icon.x + Top29_Icon.width + 70; Top30_Icon.y = Top29_Icon.y; /*finally, we add all the Tops Icon in a group called Tops_Group*/ Tops_Group = this.add.group(); Tops_Group.add(Top01_Icon); Tops_Group.add(Top02_Icon); Tops_Group.add(Top03_Icon); Tops_Group.add(Top04_Icon); Tops_Group.add(Top05_Icon); Tops_Group.add(Top06_Icon); Tops_Group.add(Top07_Icon); Tops_Group.add(Top08_Icon); Tops_Group.add(Top09_Icon); Tops_Group.add(Top10_Icon); Tops_Group.add(Top11_Icon); Tops_Group.add(Top12_Icon); Tops_Group.add(Top13_Icon); Tops_Group.add(Top14_Icon); Tops_Group.add(Top15_Icon); Tops_Group.add(Top16_Icon); Tops_Group.add(Top17_Icon); Tops_Group.add(Top18_Icon); Tops_Group.add(Top19_Icon); Tops_Group.add(Top20_Icon); Tops_Group.add(Top21_Icon); Tops_Group.add(Top22_Icon); Tops_Group.add(Top23_Icon); Tops_Group.add(Top24_Icon); Tops_Group.add(Top25_Icon); Tops_Group.add(Top26_Icon); Tops_Group.add(Top27_Icon); Tops_Group.add(Top28_Icon); Tops_Group.add(Top29_Icon); Tops_Group.add(Top30_Icon); Tops_Group.visible = false; //Bottoms_Icon Bottoms01_Icon = this.add.button(0,0,"bottom01_icon",function() { /*this Bottoms_fnc is similar to the Hair_fnc function. It also has those 4 similar parameters this.Bottoms_fnc("key for making the new graphics", name, X, Y)*/ this.Bottoms_fnc("bottoms0001","Bottoms01",BottomsX,BottomsY); },this); Bottoms01_Icon.anchor.setTo(0.5,0.5); Bottoms01_Icon.input.pixelPerfectClick = true; Bottoms01_Icon.x = 1077; Bottoms01_Icon.y = 311; Bottoms02_Icon = this.add.button(0,0,"bottom02_icon",function() { this.Bottoms_fnc("bottoms0002","Bottoms02",BottomsX,BottomsY); },this); Bottoms02_Icon.anchor.setTo(0.5,0.5); Bottoms02_Icon.input.pixelPerfectClick = true; Bottoms02_Icon.x = Bottoms01_Icon.x + Bottoms01_Icon.width + 48; Bottoms02_Icon.y = Bottoms01_Icon.y; Bottoms03_Icon = this.add.button(0,0,"bottom03_icon",function() { this.Bottoms_fnc("bottoms0003","Bottoms03",BottomsX,BottomsY); },this); Bottoms03_Icon.anchor.setTo(0.5,0.5); Bottoms03_Icon.input.pixelPerfectClick = true; Bottoms03_Icon.x = Bottoms02_Icon.x + Bottoms02_Icon.width + 48; Bottoms03_Icon.y = Bottoms02_Icon.y; Bottoms04_Icon = this.add.button(0,0,"bottom04_icon",function() { this.Bottoms_fnc("bottoms0004","Bottoms04",BottomsX,BottomsY); },this); Bottoms04_Icon.anchor.setTo(0.5,0.5); Bottoms04_Icon.input.pixelPerfectClick = true; Bottoms04_Icon.x = Bottoms03_Icon.x + Bottoms03_Icon.width + 48; Bottoms04_Icon.y = Bottoms03_Icon.y; Bottoms05_Icon = this.add.button(0,0,"bottom05_icon",function() { this.Bottoms_fnc("bottoms0005","Bottoms05",BottomsX,BottomsY); },this); Bottoms05_Icon.anchor.setTo(0.5,0.5); Bottoms05_Icon.input.pixelPerfectClick = true; Bottoms05_Icon.x = Bottoms04_Icon.x + Bottoms04_Icon.width + 48; Bottoms05_Icon.y = Bottoms04_Icon.y; Bottoms06_Icon = this.add.button(0,0,"bottom06_icon",function() { this.Bottoms_fnc("bottoms0006","Bottoms06",BottomsX,BottomsY); },this); Bottoms06_Icon.anchor.setTo(0.5,0.5); Bottoms06_Icon.input.pixelPerfectClick = true; Bottoms06_Icon.x = Bottoms01_Icon.x + 18; Bottoms06_Icon.y = Bottoms01_Icon.y + Bottoms01_Icon.height + 32; Bottoms07_Icon = this.add.button(0,0,"bottom07_icon",function() { this.Bottoms_fnc("bottoms0007","Bottoms07",BottomsX,BottomsY); },this); Bottoms07_Icon.anchor.setTo(0.5,0.5); Bottoms07_Icon.input.pixelPerfectClick = true; Bottoms07_Icon.x = Bottoms06_Icon.x + Bottoms06_Icon.width - 5; Bottoms07_Icon.y = Bottoms06_Icon.y; Bottoms08_Icon = this.add.button(0,0,"bottom08_icon",function() { this.Bottoms_fnc("bottoms0008","Bottoms08",BottomsX,BottomsY); },this); Bottoms08_Icon.anchor.setTo(0.5,0.5); Bottoms08_Icon.input.pixelPerfectClick = true; Bottoms08_Icon.x = Bottoms07_Icon.x + Bottoms07_Icon.width - 5; Bottoms08_Icon.y = Bottoms07_Icon.y; Bottoms09_Icon = this.add.button(0,0,"bottom09_icon",function() { this.Bottoms_fnc("bottoms0009","Bottoms09",BottomsX,BottomsY); },this); Bottoms09_Icon.anchor.setTo(0.5,0.5); Bottoms09_Icon.input.pixelPerfectClick = true; Bottoms09_Icon.x = Bottoms08_Icon.x + Bottoms08_Icon.width - 5; Bottoms09_Icon.y = Bottoms08_Icon.y; Bottoms10_Icon = this.add.button(0,0,"bottom10_icon",function() { this.Bottoms_fnc("bottoms0010","Bottoms10",BottomsX,BottomsY); },this); Bottoms10_Icon.anchor.setTo(0.5,0.5); Bottoms10_Icon.input.pixelPerfectClick = true; Bottoms10_Icon.x = Bottoms09_Icon.x + Bottoms09_Icon.width - 5; Bottoms10_Icon.y = Bottoms09_Icon.y; Bottoms11_Icon = this.add.button(0,0,"bottom11_icon",function() { this.Bottoms_fnc("bottoms0011","Bottoms11",BottomsX,BottomsY); },this); Bottoms11_Icon.anchor.setTo(0.5,0.5); Bottoms11_Icon.input.pixelPerfectClick = true; Bottoms11_Icon.x = Bottoms06_Icon.x - 20; Bottoms11_Icon.y = Bottoms06_Icon.y + Bottoms06_Icon.height + 32; Bottoms12_Icon = this.add.button(0,0,"bottom12_icon",function() { this.Bottoms_fnc("bottoms0012","Bottoms12",BottomsX,BottomsY); },this); Bottoms12_Icon.anchor.setTo(0.5,0.5); Bottoms12_Icon.input.pixelPerfectClick = true; Bottoms12_Icon.x = Bottoms11_Icon.x + Bottoms11_Icon.width + 73; Bottoms12_Icon.y = Bottoms11_Icon.y; Bottoms13_Icon = this.add.button(0,0,"bottom13_icon",function() { this.Bottoms_fnc("bottoms0013","Bottoms13",BottomsX,BottomsY); },this); Bottoms13_Icon.anchor.setTo(0.5,0.5); Bottoms13_Icon.input.pixelPerfectClick = true; Bottoms13_Icon.x = Bottoms12_Icon.x + Bottoms12_Icon.width + 73; Bottoms13_Icon.y = Bottoms12_Icon.y; Bottoms14_Icon = this.add.button(0,0,"bottom14_icon",function() { this.Bottoms_fnc("bottoms0014","Bottoms14",BottomsX,BottomsY); },this); Bottoms14_Icon.anchor.setTo(0.5,0.5); Bottoms14_Icon.input.pixelPerfectClick = true; Bottoms14_Icon.x = Bottoms13_Icon.x + Bottoms13_Icon.width + 73; Bottoms14_Icon.y = Bottoms13_Icon.y; Bottoms15_Icon = this.add.button(0,0,"bottom15_icon",function() { this.Bottoms_fnc("bottoms0015","Bottoms15",BottomsX,BottomsY); },this); Bottoms15_Icon.anchor.setTo(0.5,0.5); Bottoms15_Icon.input.pixelPerfectClick = true; Bottoms15_Icon.x = Bottoms14_Icon.x + Bottoms14_Icon.width + 73; Bottoms15_Icon.y = Bottoms14_Icon.y; Bottoms16_Icon = this.add.button(0,0,"bottom16_icon",function() { this.Bottoms_fnc("bottoms0016","Bottoms16",BottomsX,BottomsY); },this); Bottoms16_Icon.anchor.setTo(0.5,0.5); Bottoms16_Icon.input.pixelPerfectClick = true; Bottoms16_Icon.x = Bottoms11_Icon.x + 5; Bottoms16_Icon.y = Bottoms11_Icon.y + Bottoms11_Icon.height + 35; Bottoms17_Icon = this.add.button(0,0,"bottom17_icon",function() { this.Bottoms_fnc("bottoms0017","Bottoms17",BottomsX,BottomsY); },this); Bottoms17_Icon.anchor.setTo(0.5,0.5); Bottoms17_Icon.input.pixelPerfectClick = true; Bottoms17_Icon.x = Bottoms16_Icon.x + Bottoms16_Icon.width + 73; Bottoms17_Icon.y = Bottoms16_Icon.y; Bottoms18_Icon = this.add.button(0,0,"bottom18_icon",function() { this.Bottoms_fnc("bottoms0018","Bottoms18",BottomsX,BottomsY); },this); Bottoms18_Icon.anchor.setTo(0.5,0.5); Bottoms18_Icon.input.pixelPerfectClick = true; Bottoms18_Icon.x = Bottoms17_Icon.x + Bottoms17_Icon.width + 73; Bottoms18_Icon.y = Bottoms17_Icon.y; Bottoms19_Icon = this.add.button(0,0,"bottom19_icon",function() { this.Bottoms_fnc("bottoms0019","Bottoms19",BottomsX,BottomsY); },this); Bottoms19_Icon.anchor.setTo(0.5,0.5); Bottoms19_Icon.input.pixelPerfectClick = true; Bottoms19_Icon.x = Bottoms18_Icon.x + Bottoms18_Icon.width + 73; Bottoms19_Icon.y = Bottoms18_Icon.y; Bottoms20_Icon = this.add.button(0,0,"bottom20_icon",function() { this.Bottoms_fnc("bottoms0020","Bottoms20",BottomsX,BottomsY); },this); Bottoms20_Icon.anchor.setTo(0.5,0.5); Bottoms20_Icon.input.pixelPerfectClick = true; Bottoms20_Icon.x = Bottoms19_Icon.x + Bottoms19_Icon.width + 73; Bottoms20_Icon.y = Bottoms19_Icon.y; Bottoms21_Icon = this.add.button(0,0,"bottom21_icon",function() { this.Bottoms_fnc("bottoms0021","Bottoms21",BottomsX,BottomsY); },this); Bottoms21_Icon.anchor.setTo(0.5,0.5); Bottoms21_Icon.input.pixelPerfectClick = true; Bottoms21_Icon.x = Bottoms16_Icon.x + 5; Bottoms21_Icon.y = Bottoms16_Icon.y + Bottoms16_Icon.height - 28; Bottoms21_Icon.inputEnabled = true; Bottoms22_Icon = this.add.button(0,0,"bottom22_icon",function() { this.Bottoms_fnc("bottoms0022","Bottoms22",BottomsX,BottomsY); },this); Bottoms22_Icon.anchor.setTo(0.5,0.5); Bottoms22_Icon.input.pixelPerfectClick = true; Bottoms22_Icon.x = Bottoms21_Icon.x + Bottoms21_Icon.width + 42; Bottoms22_Icon.y = Bottoms21_Icon.y; Bottoms23_Icon = this.add.button(0,0,"bottom23_icon",function() { this.Bottoms_fnc("bottoms0023","Bottoms23",BottomsX,BottomsY); },this); Bottoms23_Icon.anchor.setTo(0.5,0.5); Bottoms23_Icon.input.pixelPerfectClick = true; Bottoms23_Icon.x = Bottoms22_Icon.x + Bottoms22_Icon.width + 42; Bottoms23_Icon.y = Bottoms22_Icon.y; Bottoms24_Icon = this.add.button(0,0,"bottom24_icon",function() { this.Bottoms_fnc("bottoms0024","Bottoms24",BottomsX,BottomsY); },this); Bottoms24_Icon.anchor.setTo(0.5,0.5); Bottoms24_Icon.input.pixelPerfectClick = true; Bottoms24_Icon.x = Bottoms23_Icon.x + Bottoms23_Icon.width + 42; Bottoms24_Icon.y = Bottoms23_Icon.y; Bottoms25_Icon = this.add.button(0,0,"bottom25_icon",function() { this.Bottoms_fnc("bottoms0025","Bottoms25",BottomsX,BottomsY); },this); Bottoms25_Icon.anchor.setTo(0.5,0.5); Bottoms25_Icon.input.pixelPerfectClick = true; Bottoms25_Icon.x = Bottoms24_Icon.x + Bottoms24_Icon.width + 42; Bottoms25_Icon.y = Bottoms24_Icon.y; Bottoms26_Icon = this.add.button(0,0,"bottom26_icon",function() { this.Bottoms_fnc("bottoms0026","Bottoms26",BottomsX,BottomsY); },this); Bottoms26_Icon.anchor.setTo(0.5,0.5); Bottoms26_Icon.input.pixelPerfectClick = true; Bottoms26_Icon.x = Bottoms21_Icon.x + 5; Bottoms26_Icon.y = Bottoms21_Icon.y + Bottoms21_Icon.height + 70; Bottoms27_Icon = this.add.button(0,0,"bottom27_icon",function() { this.Bottoms_fnc("bottoms0027","Bottoms27",BottomsX,BottomsY); },this); Bottoms27_Icon.anchor.setTo(0.5,0.5); Bottoms27_Icon.input.pixelPerfectClick = true; Bottoms27_Icon.x = Bottoms26_Icon.x + Bottoms26_Icon.width + 77; Bottoms27_Icon.y = Bottoms26_Icon.y; Bottoms28_Icon = this.add.button(0,0,"bottom28_icon",function() { this.Bottoms_fnc("bottoms0028","Bottoms28",BottomsX,BottomsY); },this); Bottoms28_Icon.anchor.setTo(0.5,0.5); Bottoms28_Icon.input.pixelPerfectClick = true; Bottoms28_Icon.x = Bottoms27_Icon.x + Bottoms27_Icon.width + 77; Bottoms28_Icon.y = Bottoms27_Icon.y; Bottoms29_Icon = this.add.button(0,0,"bottom29_icon",function() { this.Bottoms_fnc("bottoms0029","Bottoms29",BottomsX,BottomsY); },this); Bottoms29_Icon.anchor.setTo(0.5,0.5); Bottoms29_Icon.input.pixelPerfectClick = true; Bottoms29_Icon.x = Bottoms28_Icon.x + Bottoms28_Icon.width + 77; Bottoms29_Icon.y = Bottoms28_Icon.y; Bottoms30_Icon = this.add.button(0,0,"bottom30_icon",function() { this.Bottoms_fnc("bottoms0030","Bottoms30",BottomsX,BottomsY); },this); Bottoms30_Icon.anchor.setTo(0.5,0.5); Bottoms30_Icon.input.pixelPerfectClick = true; Bottoms30_Icon.x = Bottoms29_Icon.x + Bottoms29_Icon.width + 77; Bottoms30_Icon.y = Bottoms29_Icon.y; /*finally, we add all the Bottoms Icons in a group called Bottoms_Group*/ Bottoms_Group = this.add.group(); Bottoms_Group.add(Bottoms01_Icon); Bottoms_Group.add(Bottoms02_Icon); Bottoms_Group.add(Bottoms03_Icon); Bottoms_Group.add(Bottoms04_Icon); Bottoms_Group.add(Bottoms05_Icon); Bottoms_Group.add(Bottoms06_Icon); Bottoms_Group.add(Bottoms07_Icon); Bottoms_Group.add(Bottoms08_Icon); Bottoms_Group.add(Bottoms09_Icon); Bottoms_Group.add(Bottoms10_Icon); Bottoms_Group.add(Bottoms11_Icon); Bottoms_Group.add(Bottoms12_Icon); Bottoms_Group.add(Bottoms13_Icon); Bottoms_Group.add(Bottoms14_Icon); Bottoms_Group.add(Bottoms15_Icon); Bottoms_Group.add(Bottoms16_Icon); Bottoms_Group.add(Bottoms17_Icon); Bottoms_Group.add(Bottoms18_Icon); Bottoms_Group.add(Bottoms19_Icon); Bottoms_Group.add(Bottoms20_Icon); Bottoms_Group.add(Bottoms21_Icon); Bottoms_Group.add(Bottoms22_Icon); Bottoms_Group.add(Bottoms23_Icon); Bottoms_Group.add(Bottoms24_Icon); Bottoms_Group.add(Bottoms25_Icon); Bottoms_Group.add(Bottoms26_Icon); Bottoms_Group.add(Bottoms27_Icon); Bottoms_Group.add(Bottoms28_Icon); Bottoms_Group.add(Bottoms29_Icon); Bottoms_Group.add(Bottoms30_Icon); Bottoms_Group.visible = false; //Dress_Icon Dress01_Icon = this.add.button(0,0,"dress01_icon",function() { /*as you will notice, we also use the Clothes_fnc function here similar for the Tops, it is because we are going to chose if we want to see her using Tops or Dresses*/ this.Clothes_fnc("dress0001","Dress01",DressX,DressY); Bottoms.visible = false; },this); Dress01_Icon.anchor.setTo(0.5,0.5); Dress01_Icon.input.pixelPerfectClick = true; Dress01_Icon.x = 1069; Dress01_Icon.y = 322; Dress02_Icon = this.add.button(0,0,"dress02_icon",function() { this.Clothes_fnc("dress0002","Dress02",DressX,DressY); Bottoms.visible = false; },this); Dress02_Icon.anchor.setTo(0.5,0.5); Dress02_Icon.input.pixelPerfectClick = true; Dress02_Icon.x = Dress01_Icon.x + Dress01_Icon.width + 75; Dress02_Icon.y = Dress01_Icon.y; Dress03_Icon = this.add.button(0,0,"dress03_icon",function() { this.Clothes_fnc("dress0003","Dress03",DressX,DressY); Bottoms.visible = false; },this); Dress03_Icon.anchor.setTo(0.5,0.5); Dress03_Icon.input.pixelPerfectClick = true; Dress03_Icon.x = Dress02_Icon.x + Dress02_Icon.width + 75; Dress03_Icon.y = Dress02_Icon.y; Dress04_Icon = this.add.button(0,0,"dress04_icon",function() { this.Clothes_fnc("dress0004","Dress04",DressX,DressY); Bottoms.visible = false; },this); Dress04_Icon.anchor.setTo(0.5,0.5); Dress04_Icon.input.pixelPerfectClick = true; Dress04_Icon.x = Dress03_Icon.x + Dress03_Icon.width + 75; Dress04_Icon.y = Dress03_Icon.y; Dress05_Icon = this.add.button(0,0,"dress05_icon",function() { this.Clothes_fnc("dress0005","Dress05",DressX,DressY); Bottoms.visible = false; },this); Dress05_Icon.anchor.setTo(0.5,0.5); Dress05_Icon.input.pixelPerfectClick = true; Dress05_Icon.x = Dress04_Icon.x + Dress04_Icon.width + 75; Dress05_Icon.y = Dress04_Icon.y; Dress06_Icon = this.add.button(0,0,"dress06_icon",function() { this.Clothes_fnc("dress0006","Dress06",DressX,DressY); Bottoms.visible = false; },this); Dress06_Icon.anchor.setTo(0.5,0.5); Dress06_Icon.input.pixelPerfectClick = true; Dress06_Icon.x = Dress01_Icon.x; Dress06_Icon.y = Dress01_Icon.y + Dress01_Icon.height + 25; Dress07_Icon = this.add.button(0,0,"dress07_icon",function() { this.Clothes_fnc("dress0007","Dress07",DressX,DressY); Bottoms.visible = false; },this); Dress07_Icon.anchor.setTo(0.5,0.5); Dress07_Icon.input.pixelPerfectClick = true; Dress07_Icon.x = Dress06_Icon.x + Dress06_Icon.width + 40; Dress07_Icon.y = Dress06_Icon.y; Dress08_Icon = this.add.button(0,0,"dress08_icon",function() { this.Clothes_fnc("dress0008","Dress08",DressX,DressY); Bottoms.visible = false; },this); Dress08_Icon.anchor.setTo(0.5,0.5); Dress08_Icon.input.pixelPerfectClick = true; Dress08_Icon.x = Dress07_Icon.x + Dress07_Icon.width + 40; Dress08_Icon.y = Dress07_Icon.y; Dress09_Icon = this.add.button(0,0,"dress09_icon",function() { this.Clothes_fnc("dress0009","Dress09",DressX,DressY); Bottoms.visible = false; },this); Dress09_Icon.anchor.setTo(0.5,0.5); Dress09_Icon.input.pixelPerfectClick = true; Dress09_Icon.x = Dress08_Icon.x + Dress08_Icon.width + 40; Dress09_Icon.y = Dress08_Icon.y; Dress10_Icon = this.add.button(0,0,"dress10_icon",function() { this.Clothes_fnc("dress0010","Dress10",DressX,DressY); Bottoms.visible = false; },this); Dress10_Icon.anchor.setTo(0.5,0.5); Dress10_Icon.input.pixelPerfectClick = true; Dress10_Icon.x = Dress09_Icon.x + Dress09_Icon.width + 40; Dress10_Icon.y = Dress09_Icon.y; Dress11_Icon = this.add.button(0,0,"dress11_icon",function() { this.Clothes_fnc("dress0011","Dress11",DressX,DressY); Bottoms.visible = false; },this); Dress11_Icon.anchor.setTo(0.5,0.5); Dress11_Icon.input.pixelPerfectClick = true; Dress11_Icon.x = Dress06_Icon.x; Dress11_Icon.y = Dress06_Icon.y + Dress06_Icon.height; Dress12_Icon = this.add.button(0,0,"dress12_icon",function() { this.Clothes_fnc("dress0012","Dress12",DressX,DressY); Bottoms.visible = false; },this); Dress12_Icon.anchor.setTo(0.5,0.5); Dress12_Icon.input.pixelPerfectClick = true; Dress12_Icon.x = Dress11_Icon.x + Dress11_Icon.width + 63; Dress12_Icon.y = Dress11_Icon.y; Dress13_Icon = this.add.button(0,0,"dress13_icon",function() { this.Clothes_fnc("dress0013","Dress13",DressX,DressY); Bottoms.visible = false; },this); Dress13_Icon.anchor.setTo(0.5,0.5); Dress13_Icon.input.pixelPerfectClick = true; Dress13_Icon.x = Dress12_Icon.x + Dress12_Icon.width + 63; Dress13_Icon.y = Dress12_Icon.y; Dress14_Icon = this.add.button(0,0,"dress14_icon",function() { this.Clothes_fnc("dress0014","Dress14",DressX,DressY); Bottoms.visible = false; },this); Dress14_Icon.anchor.setTo(0.5,0.5); Dress14_Icon.input.pixelPerfectClick = true; Dress14_Icon.x = Dress13_Icon.x + Dress13_Icon.width + 63; Dress14_Icon.y = Dress13_Icon.y; Dress15_Icon = this.add.button(0,0,"dress15_icon",function() { this.Clothes_fnc("dress0015","Dress15",DressX,DressY); Bottoms.visible = false; },this); Dress15_Icon.anchor.setTo(0.5,0.5); Dress15_Icon.input.pixelPerfectClick = true; Dress15_Icon.x = Dress14_Icon.x + Dress14_Icon.width + 63; Dress15_Icon.y = Dress14_Icon.y; Dress16_Icon = this.add.button(0,0,"dress16_icon",function() { this.Clothes_fnc("dress0016","Dress16",DressX,DressY); Bottoms.visible = false; },this); Dress16_Icon.anchor.setTo(0.5,0.5); Dress16_Icon.input.pixelPerfectClick = true; Dress16_Icon.x = Dress11_Icon.x; Dress16_Icon.y = Dress11_Icon.y + Dress11_Icon.height; Dress17_Icon = this.add.button(0,0,"dress17_icon",function() { this.Clothes_fnc("dress0017","Dress17",DressX,DressY); Bottoms.visible = false; },this); Dress17_Icon.anchor.setTo(0.5,0.5); Dress17_Icon.input.pixelPerfectClick = true; Dress17_Icon.x = Dress16_Icon.x + Dress16_Icon.width + 75; Dress17_Icon.y = Dress16_Icon.y; Dress18_Icon = this.add.button(0,0,"dress18_icon",function() { this.Clothes_fnc("dress0018","Dress18",DressX,DressY); Bottoms.visible = false; },this); Dress18_Icon.anchor.setTo(0.5,0.5); Dress18_Icon.input.pixelPerfectClick = true; Dress18_Icon.x = Dress17_Icon.x + Dress17_Icon.width + 75; Dress18_Icon.y = Dress17_Icon.y; Dress19_Icon = this.add.button(0,0,"dress19_icon",function() { this.Clothes_fnc("dress0019","Dress19",DressX,DressY); Bottoms.visible = false; },this); Dress19_Icon.anchor.setTo(0.5,0.5); Dress19_Icon.input.pixelPerfectClick = true; Dress19_Icon.x = Dress18_Icon.x + Dress18_Icon.width + 75; Dress19_Icon.y = Dress18_Icon.y; Dress20_Icon = this.add.button(0,0,"dress20_icon",function() { this.Clothes_fnc("dress0020","Dress20",DressX,DressY); Bottoms.visible = false; },this); Dress20_Icon.anchor.setTo(0.5,0.5); Dress20_Icon.input.pixelPerfectClick = true; Dress20_Icon.x = Dress19_Icon.x + Dress19_Icon.width + 75; Dress20_Icon.y = Dress19_Icon.y; Dress21_Icon = this.add.button(0,0,"dress21_icon",function() { this.Clothes_fnc("dress0021","Dress21",DressX,DressY); Bottoms.visible = false; },this); Dress21_Icon.anchor.setTo(0.5,0.5); Dress21_Icon.input.pixelPerfectClick = true; Dress21_Icon.x = Dress16_Icon.x; Dress21_Icon.y = Dress16_Icon.y + Dress16_Icon.height + 10; Dress22_Icon = this.add.button(0,0,"dress22_icon",function() { this.Clothes_fnc("dress0022","Dress22",DressX,DressY); Bottoms.visible = false; },this); Dress22_Icon.anchor.setTo(0.5,0.5); Dress22_Icon.input.pixelPerfectClick = true; Dress22_Icon.x = Dress21_Icon.x + Dress21_Icon.width + 77; Dress22_Icon.y = Dress21_Icon.y; Dress23_Icon = this.add.button(0,0,"dress23_icon",function() { this.Clothes_fnc("dress0023","Dress23",DressX,DressY); Bottoms.visible = false; },this); Dress23_Icon.anchor.setTo(0.5,0.5); Dress23_Icon.input.pixelPerfectClick = true; Dress23_Icon.x = Dress22_Icon.x + Dress22_Icon.width + 77; Dress23_Icon.y = Dress22_Icon.y; Dress24_Icon = this.add.button(0,0,"dress24_icon",function() { this.Clothes_fnc("dress0024","Dress24",DressX,DressY); Bottoms.visible = false; },this); Dress24_Icon.anchor.setTo(0.5,0.5); Dress24_Icon.input.pixelPerfectClick = true; Dress24_Icon.x = Dress23_Icon.x + Dress23_Icon.width + 77; Dress24_Icon.y = Dress23_Icon.y; Dress25_Icon = this.add.button(0,0,"dress25_icon",function() { this.Clothes_fnc("dress0025","Dress25",DressX,DressY); Bottoms.visible = false; },this); Dress25_Icon.anchor.setTo(0.5,0.5); Dress25_Icon.input.pixelPerfectClick = true; Dress25_Icon.x = Dress24_Icon.x + Dress24_Icon.width + 77; Dress25_Icon.y = Dress24_Icon.y; Dress26_Icon = this.add.button(0,0,"dress26_icon",function() { this.Clothes_fnc("dress0026","Dress26",DressX,DressY); Bottoms.visible = false; },this); Dress26_Icon.anchor.setTo(0.5,0.5); Dress26_Icon.input.pixelPerfectClick = true; Dress26_Icon.x = Dress21_Icon.x; Dress26_Icon.y = Dress21_Icon.y + Dress21_Icon.height + 25; Dress27_Icon = this.add.button(0,0,"dress27_icon",function() { this.Clothes_fnc("dress0027","Dress27",DressX,DressY); Bottoms.visible = false; },this); Dress27_Icon.anchor.setTo(0.5,0.5); Dress27_Icon.input.pixelPerfectClick = true; Dress27_Icon.x = Dress26_Icon.x + Dress26_Icon.width + 72; Dress27_Icon.y = Dress26_Icon.y; Dress28_Icon = this.add.button(0,0,"dress28_icon",function() { this.Clothes_fnc("dress0028","Dress28",DressX,DressY); Bottoms.visible = false; },this); Dress28_Icon.anchor.setTo(0.5,0.5); Dress28_Icon.input.pixelPerfectClick = true; Dress28_Icon.x = Dress27_Icon.x + Dress27_Icon.width + 72; Dress28_Icon.y = Dress27_Icon.y; Dress29_Icon = this.add.button(0,0,"dress29_icon",function() { this.Clothes_fnc("dress0029","Dress29",DressX,DressY); Bottoms.visible = false; },this); Dress29_Icon.anchor.setTo(0.5,0.5); Dress29_Icon.input.pixelPerfectClick = true; Dress29_Icon.x = Dress28_Icon.x + Dress28_Icon.width + 72; Dress29_Icon.y = Dress28_Icon.y; Dress30_Icon = this.add.button(0,0,"dress30_icon",function() { this.Clothes_fnc("dress0030","Dress30",DressX,DressY); Bottoms.visible = false; },this); Dress30_Icon.anchor.setTo(0.5,0.5); Dress30_Icon.input.pixelPerfectClick = true; Dress30_Icon.x = Dress29_Icon.x + Dress29_Icon.width + 72; Dress30_Icon.y = Dress29_Icon.y; /*finally, we add all the Dress Icon in a group called Dress_Group*/ Dress_Group = this.add.group(); Dress_Group.add(Dress01_Icon); Dress_Group.add(Dress02_Icon); Dress_Group.add(Dress03_Icon); Dress_Group.add(Dress04_Icon); Dress_Group.add(Dress05_Icon); Dress_Group.add(Dress06_Icon); Dress_Group.add(Dress07_Icon); Dress_Group.add(Dress08_Icon); Dress_Group.add(Dress09_Icon); Dress_Group.add(Dress10_Icon); Dress_Group.add(Dress11_Icon); Dress_Group.add(Dress12_Icon); Dress_Group.add(Dress13_Icon); Dress_Group.add(Dress14_Icon); Dress_Group.add(Dress15_Icon); Dress_Group.add(Dress16_Icon); Dress_Group.add(Dress17_Icon); Dress_Group.add(Dress18_Icon); Dress_Group.add(Dress19_Icon); Dress_Group.add(Dress20_Icon); Dress_Group.add(Dress21_Icon); Dress_Group.add(Dress22_Icon); Dress_Group.add(Dress23_Icon); Dress_Group.add(Dress24_Icon); Dress_Group.add(Dress25_Icon); Dress_Group.add(Dress26_Icon); Dress_Group.add(Dress27_Icon); Dress_Group.add(Dress28_Icon); Dress_Group.add(Dress29_Icon); Dress_Group.add(Dress30_Icon); Dress_Group.visible = false; //Shoes_Icon Shoes01_Icon = this.add.button(0,0,"shoes01_icon",function() { /*this Shoes_fnc is similar to the Hair_fnc function. It also has those 5 similar parameters this.Shoes_fnc("key for making the new graphics", name, X, Y)*/ this.Shoes_fnc("shoes0001","Shoes01",ShoesX,ShoesY); },this); Shoes01_Icon.anchor.setTo(0.5,0.5); Shoes01_Icon.x = 1084; Shoes01_Icon.y = 340; Shoes02_Icon = this.add.button(0,0,"shoes02_icon",function() { this.Shoes_fnc("shoes0002","Shoes02",ShoesX,ShoesY); },this); Shoes02_Icon.anchor.setTo(0.5,0.5); Shoes02_Icon.x = Shoes01_Icon.x + Shoes01_Icon.width + 7; Shoes02_Icon.y = Shoes01_Icon.y; Shoes03_Icon = this.add.button(0,0,"shoes03_icon",function() { this.Shoes_fnc("shoes0003","Shoes03",ShoesX,ShoesY); },this); Shoes03_Icon.anchor.setTo(0.5,0.5); Shoes03_Icon.x = Shoes02_Icon.x + Shoes02_Icon.width + 7; Shoes03_Icon.y = Shoes02_Icon.y; Shoes04_Icon = this.add.button(0,0,"shoes04_icon",function() { this.Shoes_fnc("shoes0004","Shoes04",ShoesX,ShoesY); },this); Shoes04_Icon.anchor.setTo(0.5,0.5); Shoes04_Icon.x = Shoes03_Icon.x + Shoes03_Icon.width + 7; Shoes04_Icon.y = Shoes03_Icon.y; Shoes05_Icon = this.add.button(0,0,"shoes05_icon",function() { this.Shoes_fnc("shoes0005","Shoes05",ShoesX,ShoesY); },this); Shoes05_Icon.anchor.setTo(0.5,0.5); Shoes05_Icon.x = Shoes04_Icon.x + Shoes04_Icon.width + 7; Shoes05_Icon.y = Shoes04_Icon.y; Shoes06_Icon = this.add.button(0,0,"shoes06_icon",function() { this.Shoes_fnc("shoes0006","Shoes06",ShoesX,ShoesY); },this); Shoes06_Icon.anchor.setTo(0.5,0.5); Shoes06_Icon.x = Shoes01_Icon.x - 40; Shoes06_Icon.y = Shoes01_Icon.y + Shoes01_Icon.height; Shoes07_Icon = this.add.button(0,0,"shoes07_icon",function() { this.Shoes_fnc("shoes0007","Shoes07",ShoesX,ShoesY); },this); Shoes07_Icon.anchor.setTo(0.5,0.5); Shoes07_Icon.x = Shoes06_Icon.x + Shoes06_Icon.width + 165; Shoes07_Icon.y = Shoes06_Icon.y; Shoes08_Icon = this.add.button(0,0,"shoes08_icon",function() { this.Shoes_fnc("shoes0008","Shoes08",ShoesX,ShoesY); },this); Shoes08_Icon.anchor.setTo(0.5,0.5); Shoes08_Icon.x = Shoes07_Icon.x + Shoes07_Icon.width + 165; Shoes08_Icon.y = Shoes07_Icon.y; Shoes09_Icon = this.add.button(0,0,"shoes09_icon",function() { this.Shoes_fnc("shoes0009","Shoes09",ShoesX,ShoesY); },this); Shoes09_Icon.anchor.setTo(0.5,0.5); Shoes09_Icon.x = Shoes08_Icon.x + Shoes08_Icon.width + 165; Shoes09_Icon.y = Shoes08_Icon.y; Shoes10_Icon = this.add.button(0,0,"shoes10_icon",function() { this.Shoes_fnc("shoes0010","Shoes10",ShoesX,ShoesY); },this); Shoes10_Icon.anchor.setTo(0.5,0.5); Shoes10_Icon.x = Shoes09_Icon.x + Shoes09_Icon.width + 165; Shoes10_Icon.y = Shoes09_Icon.y; Shoes11_Icon = this.add.button(0,0,"shoes11_icon",function() { this.Shoes_fnc("shoes0011","Shoes11",ShoesX,ShoesY); },this); Shoes11_Icon.anchor.setTo(0.5,0.5); Shoes11_Icon.x = Shoes06_Icon.x + 10; Shoes11_Icon.y = Shoes06_Icon.y + Shoes06_Icon.height - 25; Shoes12_Icon = this.add.button(0,0,"shoes12_icon",function() { this.Shoes_fnc("shoes0012","Shoes12",ShoesX,ShoesY); },this); Shoes12_Icon.anchor.setTo(0.5,0.5); Shoes12_Icon.x = Shoes11_Icon.x + Shoes11_Icon.width + 168; Shoes12_Icon.y = Shoes11_Icon.y; Shoes13_Icon = this.add.button(0,0,"shoes13_icon",function() { this.Shoes_fnc("shoes0013","Shoes13",ShoesX,ShoesY); },this); Shoes13_Icon.anchor.setTo(0.5,0.5); Shoes13_Icon.x = Shoes12_Icon.x + Shoes12_Icon.width + 168; Shoes13_Icon.y = Shoes12_Icon.y; Shoes14_Icon = this.add.button(0,0,"shoes14_icon",function() { this.Shoes_fnc("shoes0014","Shoes14",ShoesX,ShoesY); },this); Shoes14_Icon.anchor.setTo(0.5,0.5); Shoes14_Icon.x = Shoes13_Icon.x + Shoes13_Icon.width + 168; Shoes14_Icon.y = Shoes13_Icon.y; Shoes15_Icon = this.add.button(0,0,"shoes15_icon",function() { this.Shoes_fnc("shoes0015","Shoes15",ShoesX,ShoesY); },this); Shoes15_Icon.anchor.setTo(0.5,0.5); Shoes15_Icon.x = Shoes14_Icon.x + Shoes14_Icon.width + 168; Shoes15_Icon.y = Shoes14_Icon.y; Shoes16_Icon = this.add.button(0,0,"shoes16_icon",function() { this.Shoes_fnc("shoes0016","Shoes16",ShoesX,ShoesY); },this); Shoes16_Icon.anchor.setTo(0.5,0.5); Shoes16_Icon.x = Shoes11_Icon.x; Shoes16_Icon.y = Shoes11_Icon.y + Shoes11_Icon.height + 15; Shoes17_Icon = this.add.button(0,0,"shoes17_icon",function() { this.Shoes_fnc("shoes0017","Shoes17",ShoesX,ShoesY); },this); Shoes17_Icon.anchor.setTo(0.5,0.5); Shoes17_Icon.x = Shoes16_Icon.x + Shoes16_Icon.width + 157; Shoes17_Icon.y = Shoes16_Icon.y; Shoes18_Icon = this.add.button(0,0,"shoes18_icon",function() { this.Shoes_fnc("shoes0018","Shoes18",ShoesX,ShoesY); },this); Shoes18_Icon.anchor.setTo(0.5,0.5); Shoes18_Icon.x = Shoes17_Icon.x + Shoes17_Icon.width + 157; Shoes18_Icon.y = Shoes17_Icon.y; Shoes19_Icon = this.add.button(0,0,"shoes19_icon",function() { this.Shoes_fnc("shoes0019","Shoes19",ShoesX,ShoesY); },this); Shoes19_Icon.anchor.setTo(0.5,0.5); Shoes19_Icon.x = Shoes18_Icon.x + Shoes18_Icon.width + 157; Shoes19_Icon.y = Shoes18_Icon.y; Shoes20_Icon = this.add.button(0,0,"shoes20_icon",function() { this.Shoes_fnc("shoes0020","Shoes20",ShoesX,ShoesY); },this); Shoes20_Icon.anchor.setTo(0.5,0.5); Shoes20_Icon.x = Shoes19_Icon.x + Shoes19_Icon.width + 157; Shoes20_Icon.y = Shoes19_Icon.y; Shoes21_Icon = this.add.button(0,0,"shoes21_icon",function() { this.Shoes_fnc("shoes0021","Shoes21",ShoesX,ShoesY); },this); Shoes21_Icon.anchor.setTo(0.5,0.5); Shoes21_Icon.x = Shoes16_Icon.x + 10; Shoes21_Icon.y = Shoes16_Icon.y + Shoes16_Icon.height - 10; Shoes22_Icon = this.add.button(0,0,"shoes22_icon",function() { this.Shoes_fnc("shoes0022","Shoes22",ShoesX,ShoesY); },this); Shoes22_Icon.anchor.setTo(0.5,0.5); Shoes22_Icon.x = Shoes21_Icon.x + Shoes21_Icon.width + 166; Shoes22_Icon.y = Shoes21_Icon.y; Shoes23_Icon = this.add.button(0,0,"shoes23_icon",function() { this.Shoes_fnc("shoes0023","Shoes23",ShoesX,ShoesY); },this); Shoes23_Icon.anchor.setTo(0.5,0.5); Shoes23_Icon.x = Shoes22_Icon.x + Shoes22_Icon.width + 166; Shoes23_Icon.y = Shoes22_Icon.y; Shoes24_Icon = this.add.button(0,0,"shoes24_icon",function() { this.Shoes_fnc("shoes0024","Shoes24",ShoesX,ShoesY); },this); Shoes24_Icon.anchor.setTo(0.5,0.5); Shoes24_Icon.x = Shoes23_Icon.x + Shoes23_Icon.width + 166; Shoes24_Icon.y = Shoes23_Icon.y; Shoes25_Icon = this.add.button(0,0,"shoes25_icon",function() { this.Shoes_fnc("shoes0025","Shoes25",ShoesX,ShoesY); },this); Shoes25_Icon.anchor.setTo(0.5,0.5); Shoes25_Icon.x = Shoes24_Icon.x + Shoes24_Icon.width + 166; Shoes25_Icon.y = Shoes24_Icon.y; Shoes26_Icon = this.add.button(0,0,"shoes26_icon",function() { this.Shoes_fnc("shoes0026","Shoes26",ShoesX,ShoesY); },this); Shoes26_Icon.anchor.setTo(0.5,0.5); Shoes26_Icon.x = Shoes21_Icon.x; Shoes26_Icon.y = Shoes21_Icon.y + Shoes21_Icon.height - 15; Shoes27_Icon = this.add.button(0,0,"shoes27_icon",function() { this.Shoes_fnc("shoes0027","Shoes27",ShoesX,ShoesY); },this); Shoes27_Icon.anchor.setTo(0.5,0.5); Shoes27_Icon.x = Shoes26_Icon.x + Shoes26_Icon.width + 155; Shoes27_Icon.y = Shoes26_Icon.y; Shoes28_Icon = this.add.button(0,0,"shoes28_icon",function() { this.Shoes_fnc("shoes0028","Shoes28",ShoesX,ShoesY); },this); Shoes28_Icon.anchor.setTo(0.5,0.5); Shoes28_Icon.x = Shoes27_Icon.x + Shoes27_Icon.width + 155; Shoes28_Icon.y = Shoes27_Icon.y; Shoes29_Icon = this.add.button(0,0,"shoes29_icon",function() { this.Shoes_fnc("shoes0029","Shoes29",ShoesX,ShoesY); },this); Shoes29_Icon.anchor.setTo(0.5,0.5); Shoes29_Icon.x = Shoes28_Icon.x + Shoes28_Icon.width + 155; Shoes29_Icon.y = Shoes28_Icon.y; Shoes30_Icon = this.add.button(0,0,"shoes30_icon",function() { this.Shoes_fnc("shoes0030","Shoes30",ShoesX,ShoesY); },this); Shoes30_Icon.anchor.setTo(0.5,0.5); Shoes30_Icon.x = Shoes29_Icon.x + Shoes29_Icon.width + 155; Shoes30_Icon.y = Shoes29_Icon.y; /*finally we add all the Shoes Icon in a group called Shoes_Group*/ Shoes_Group = this.add.group(); Shoes_Group.add(Shoes01_Icon); Shoes_Group.add(Shoes02_Icon); Shoes_Group.add(Shoes03_Icon); Shoes_Group.add(Shoes04_Icon); Shoes_Group.add(Shoes05_Icon); Shoes_Group.add(Shoes06_Icon); Shoes_Group.add(Shoes07_Icon); Shoes_Group.add(Shoes08_Icon); Shoes_Group.add(Shoes09_Icon); Shoes_Group.add(Shoes10_Icon); Shoes_Group.add(Shoes11_Icon); Shoes_Group.add(Shoes12_Icon); Shoes_Group.add(Shoes13_Icon); Shoes_Group.add(Shoes14_Icon); Shoes_Group.add(Shoes15_Icon); Shoes_Group.add(Shoes16_Icon); Shoes_Group.add(Shoes17_Icon); Shoes_Group.add(Shoes18_Icon); Shoes_Group.add(Shoes19_Icon); Shoes_Group.add(Shoes20_Icon); Shoes_Group.add(Shoes21_Icon); Shoes_Group.add(Shoes22_Icon); Shoes_Group.add(Shoes23_Icon); Shoes_Group.add(Shoes24_Icon); Shoes_Group.add(Shoes25_Icon); Shoes_Group.add(Shoes26_Icon); Shoes_Group.add(Shoes27_Icon); Shoes_Group.add(Shoes28_Icon); Shoes_Group.add(Shoes29_Icon); Shoes_Group.add(Shoes30_Icon); Shoes_Group.visible = false; //Socks_Icon Socks01_Icon = this.add.button(0,0,"socks01_icon",function() { /*this Socks_fnc is similar to the Hair_fnc function. It also has those 5 similar parameters this.Socks_fnc("key for making the new graphics", name, X, Y)*/ this.Socks_fnc("socks0001","Socks01",SocksX,SocksY); },this); Socks01_Icon.anchor.setTo(0.5,0.5); Socks01_Icon.x = 1047; Socks01_Icon.y = 404; Socks02_Icon = this.add.button(0,0,"socks02_icon",function() { this.Socks_fnc("socks0002","Socks02",SocksX,SocksY); },this); Socks02_Icon.anchor.setTo(0.5,0.5); Socks02_Icon.x = Socks01_Icon.x + Socks01_Icon.width + 113; Socks02_Icon.y = Socks01_Icon.y; Socks03_Icon = this.add.button(0,0,"socks03_icon",function() { this.Socks_fnc("socks0003","Socks03",SocksX,SocksY); },this); Socks03_Icon.anchor.setTo(0.5,0.5); Socks03_Icon.x = Socks02_Icon.x + Socks02_Icon.width + 113; Socks03_Icon.y = Socks02_Icon.y; Socks04_Icon = this.add.button(0,0,"socks04_icon",function() { this.Socks_fnc("socks0004","Socks04",SocksX,SocksY); },this); Socks04_Icon.anchor.setTo(0.5,0.5); Socks04_Icon.x = Socks03_Icon.x + Socks03_Icon.width + 113; Socks04_Icon.y = Socks03_Icon.y; Socks05_Icon = this.add.button(0,0,"socks05_icon",function() { this.Socks_fnc("socks0005","Socks05",SocksX,SocksY); },this); Socks05_Icon.anchor.setTo(0.5,0.5); Socks05_Icon.x = Socks04_Icon.x + Socks04_Icon.width + 113; Socks05_Icon.y = Socks04_Icon.y; Socks06_Icon = this.add.button(0,0,"socks06_icon",function() { this.Socks_fnc("socks0006","Socks06",SocksX,SocksY); },this); Socks06_Icon.anchor.setTo(0.5,0.5); Socks06_Icon.x = Socks01_Icon.x; Socks06_Icon.y = Socks01_Icon.y + Socks01_Icon.height - 10; Socks07_Icon = this.add.button(0,0,"socks07_icon",function() { this.Socks_fnc("socks0007","Socks07",SocksX,SocksY); },this); Socks07_Icon.anchor.setTo(0.5,0.5); Socks07_Icon.x = Socks06_Icon.x + Socks06_Icon.width + 113; Socks07_Icon.y = Socks06_Icon.y; Socks08_Icon = this.add.button(0,0,"socks08_icon",function() { this.Socks_fnc("socks0008","Socks08",SocksX,SocksY); },this); Socks08_Icon.anchor.setTo(0.5,0.5); Socks08_Icon.x = Socks07_Icon.x + Socks07_Icon.width + 113; Socks08_Icon.y = Socks07_Icon.y; Socks09_Icon = this.add.button(0,0,"socks09_icon",function() { this.Socks_fnc("socks0009","Socks09",SocksX,SocksY); },this); Socks09_Icon.anchor.setTo(0.5,0.5); Socks09_Icon.x = Socks08_Icon.x + Socks08_Icon.width + 113; Socks09_Icon.y = Socks08_Icon.y; Socks10_Icon = this.add.button(0,0,"socks10_icon",function() { this.Socks_fnc("socks0010","Socks10",SocksX,SocksY); },this); Socks10_Icon.anchor.setTo(0.5,0.5); Socks10_Icon.x = Socks09_Icon.x + Socks09_Icon.width + 113; Socks10_Icon.y = Socks09_Icon.y; Socks11_Icon = this.add.button(0,0,"socks11_icon",function() { this.Socks_fnc("socks0011","Socks11",SocksX,SocksY); },this); Socks11_Icon.anchor.setTo(0.5,0.5); Socks11_Icon.x = Socks06_Icon.x; Socks11_Icon.y = Socks06_Icon.y + Socks06_Icon.height - 60; Socks12_Icon = this.add.button(0,0,"socks12_icon",function() { this.Socks_fnc("socks0012","Socks12",SocksX,SocksY); },this); Socks12_Icon.anchor.setTo(0.5,0.5); Socks12_Icon.x = Socks11_Icon.x + Socks11_Icon.width + 158; Socks12_Icon.y = Socks11_Icon.y; Socks13_Icon = this.add.button(0,0,"socks13_icon",function() { this.Socks_fnc("socks0013","Socks13",SocksX,SocksY); },this); Socks13_Icon.anchor.setTo(0.5,0.5); Socks13_Icon.x = Socks12_Icon.x + Socks12_Icon.width + 158; Socks13_Icon.y = Socks12_Icon.y; Socks14_Icon = this.add.button(0,0,"socks14_icon",function() { this.Socks_fnc("socks0014","Socks14",SocksX,SocksY); },this); Socks14_Icon.anchor.setTo(0.5,0.5); Socks14_Icon.x = Socks13_Icon.x + Socks13_Icon.width + 158; Socks14_Icon.y = Socks13_Icon.y; Socks15_Icon = this.add.button(0,0,"socks15_icon",function() { this.Socks_fnc("socks0015","Socks15",SocksX,SocksY); },this); Socks15_Icon.anchor.setTo(0.5,0.5); Socks15_Icon.x = Socks14_Icon.x + Socks14_Icon.width + 158; Socks15_Icon.y = Socks14_Icon.y; Socks16_Icon = this.add.button(0,0,"socks16_icon",function() { this.Socks_fnc("socks0016","Socks16",SocksX,SocksY); },this); Socks16_Icon.anchor.setTo(0.5,0.5); Socks16_Icon.x = Socks11_Icon.x + 45; Socks16_Icon.y = Socks11_Icon.y + Socks11_Icon.height - 20; Socks17_Icon = this.add.button(0,0,"socks17_icon",function() { this.Socks_fnc("socks0017","Socks17",SocksX,SocksY); },this); Socks17_Icon.anchor.setTo(0.5,0.5); Socks17_Icon.x = Socks16_Icon.x + Socks16_Icon.width + 137; Socks17_Icon.y = Socks16_Icon.y; Socks18_Icon = this.add.button(0,0,"socks18_icon",function() { this.Socks_fnc("socks0018","Socks18",SocksX,SocksY); },this); Socks18_Icon.anchor.setTo(0.5,0.5); Socks18_Icon.x = Socks17_Icon.x + Socks17_Icon.width + 137; Socks18_Icon.y = Socks17_Icon.y; Socks19_Icon = this.add.button(0,0,"socks19_icon",function() { this.Socks_fnc("socks0019","Socks19",SocksX,SocksY); },this); Socks19_Icon.anchor.setTo(0.5,0.5); Socks19_Icon.x = Socks18_Icon.x + Socks18_Icon.width + 137; Socks19_Icon.y = Socks18_Icon.y; Socks20_Icon = this.add.button(0,0,"socks20_icon",function() { this.Socks_fnc("socks0020","Socks20",SocksX,SocksY); },this); Socks20_Icon.anchor.setTo(0.5,0.5); Socks20_Icon.x = Socks19_Icon.x + Socks19_Icon.width + 137; Socks20_Icon.y = Socks19_Icon.y; /*finally, we add all the Socks Icon in a group called Socks_Group*/ Socks_Group = this.add.group(); Socks_Group.add(Socks01_Icon); Socks_Group.add(Socks02_Icon); Socks_Group.add(Socks03_Icon); Socks_Group.add(Socks04_Icon); Socks_Group.add(Socks05_Icon); Socks_Group.add(Socks06_Icon); Socks_Group.add(Socks07_Icon); Socks_Group.add(Socks08_Icon); Socks_Group.add(Socks09_Icon); Socks_Group.add(Socks10_Icon); Socks_Group.add(Socks11_Icon); Socks_Group.add(Socks12_Icon); Socks_Group.add(Socks13_Icon); Socks_Group.add(Socks14_Icon); Socks_Group.add(Socks15_Icon); Socks_Group.add(Socks16_Icon); Socks_Group.add(Socks17_Icon); Socks_Group.add(Socks18_Icon); Socks_Group.add(Socks19_Icon); Socks_Group.add(Socks20_Icon); Socks_Group.visible = false; //Extra_Icon Extra01_Icon = this.add.sprite(0,0,"extra01_icon"); Extra01_Icon.anchor.setTo(0.5,0.5); Extra01_Icon.x = 1214; Extra01_Icon.y = 450; Extra01_Icon.inputEnabled = true; Extra01_Icon.events.onInputDown.add(function(){this.DragObject_fnc(Extra01_Icon);},this); Extra01_Icon.events.onInputUp.add(function() { /*It has 5 parameters this.Extras_fnc(Icon for hit testing, "key for making the new graphics", name, X, Y)*/ this.Extras_fnc(Extra01_Icon,"extras01","Extra01",ExtrasX,ExtrasY); Extra01_Icon.x = 1214; Extra01_Icon.y = 450; },this); Extra06_Icon = this.add.sprite(0,0,"extra06_icon"); Extra06_Icon.anchor.setTo(0.5,0.5); Extra06_Icon.x = Extra01_Icon.x + Extra01_Icon.width + 80; Extra06_Icon.y = Extra01_Icon.y; Extra06_Icon.inputEnabled = true; Extra06_Icon.events.onInputDown.add(function(){this.DragObject_fnc(Extra06_Icon);},this); Extra06_Icon.events.onInputUp.add(function() { this.Extras_fnc(Extra06_Icon,"extras06","Extra06",ExtrasX,ExtrasY); Extra06_Icon.x = Extra01_Icon.x + Extra01_Icon.width + 80; Extra06_Icon.y = Extra01_Icon.y; },this); Extra03_Icon = this.add.sprite(0,0,"extra03_icon"); Extra03_Icon.anchor.setTo(0.5,0.5); Extra03_Icon.x = Extra01_Icon.x - 30; Extra03_Icon.y = Extra01_Icon.y + Extra01_Icon.height + 50; Extra03_Icon.inputEnabled = true; Extra03_Icon.events.onInputDown.add(function(){this.DragObject_fnc(Extra03_Icon);},this); Extra03_Icon.events.onInputUp.add(function() { this.Extras_fnc(Extra03_Icon,"extras03","Extra03",ExtrasX,ExtrasY); Extra03_Icon.x = Extra01_Icon.x - 30; Extra03_Icon.y = Extra01_Icon.y + Extra01_Icon.height + 50; },this); Extra02_Icon = this.add.sprite(0,0,"extra02_icon"); Extra02_Icon.anchor.setTo(0.5,0.5); Extra02_Icon.x = Extra03_Icon.x + Extra03_Icon.width + 130; Extra02_Icon.y = Extra03_Icon.y; Extra02_Icon.inputEnabled = true; Extra02_Icon.events.onInputDown.add(function(){this.DragObject_fnc(Extra02_Icon);},this); Extra02_Icon.events.onInputUp.add(function() { this.Extras_fnc(Extra02_Icon,"extras02","Extra02",ExtrasX,ExtrasY); Extra02_Icon.x = Extra03_Icon.x + Extra03_Icon.width + 130; Extra02_Icon.y = Extra03_Icon.y; },this); Extra04_Icon = this.add.sprite(0,0,"extra04_icon"); Extra04_Icon.anchor.setTo(0.5,0.5); Extra04_Icon.x = Extra03_Icon.x + 20; Extra04_Icon.y = Extra03_Icon.y + Extra03_Icon.height - 10; Extra04_Icon.inputEnabled = true; Extra04_Icon.events.onInputDown.add(function(){this.DragObject_fnc(Extra04_Icon);},this); Extra04_Icon.events.onInputUp.add(function() { this.Extras_fnc(Extra04_Icon,"extras04","Extra04",ExtrasX,ExtrasY); Extra04_Icon.x = Extra03_Icon.x + 20; Extra04_Icon.y = Extra03_Icon.y + Extra03_Icon.height - 10; },this); Extra05_Icon = this.add.sprite(0,0,"extra05_icon"); Extra05_Icon.anchor.setTo(0.5,0.5); Extra05_Icon.x = Extra04_Icon.x + Extra04_Icon.width + 50; Extra05_Icon.y = Extra04_Icon.y; Extra05_Icon.inputEnabled = true; Extra05_Icon.events.onInputDown.add(function(){this.DragObject_fnc(Extra05_Icon);},this); Extra05_Icon.events.onInputUp.add(function() { this.Extras_fnc(Extra05_Icon,"extras05","Extra05",ExtrasX,ExtrasY); Extra05_Icon.x = Extra04_Icon.x + Extra04_Icon.width + 50; Extra05_Icon.y = Extra04_Icon.y; },this); /*finally, we add all the Extra Icon in a group called Extras_Group*/ Extras_Group = this.add.group(); Extras_Group.add(Extra01_Icon); Extras_Group.add(Extra02_Icon); Extras_Group.add(Extra03_Icon); Extras_Group.add(Extra04_Icon); Extras_Group.add(Extra05_Icon); Extras_Group.add(Extra06_Icon); Extras_Group.visible = false; //Skincolor_Icon Skincolor01_Icon = this.add.button(0,0,"skincolor01_icon",function() { /*this Body_fnc function is the simplest one. We only have 3 parameters here, which are: 1st parameter: key to make the new Body sprite 2nd and 3rd parameters: X and Y of the Body*/ this.Body_fnc("body0001",BodyX,BodyY); },this); Skincolor01_Icon.anchor.setTo(0.5,0.5); Skincolor01_Icon.x = 1430; Skincolor01_Icon.y = 378; Skincolor02_Icon = this.add.button(0,0,"skincolor02_icon",function() { this.Body_fnc("body0002",BodyX,BodyY); },this); Skincolor02_Icon.anchor.setTo(0.5,0.5); Skincolor02_Icon.x = 1641; Skincolor02_Icon.y = 535; Skincolor03_Icon = this.add.button(0,0,"skincolor03_icon",function() { this.Body_fnc("body0003",BodyX,BodyY); },this); Skincolor03_Icon.anchor.setTo(0.5,0.5); Skincolor03_Icon.x = 1430; Skincolor03_Icon.y = 711; Skincolor04_Icon = this.add.button(0,0,"skincolor04_icon",function() { this.Body_fnc("body0004",BodyX,BodyY); },this); Skincolor04_Icon.anchor.setTo(0.5,0.5); Skincolor04_Icon.x = 1188; Skincolor04_Icon.y = 870; Skincolor05_Icon = this.add.button(0,0,"skincolor05_icon",function() { this.Body_fnc("body0005",BodyX,BodyY); },this); Skincolor05_Icon.anchor.setTo(0.5,0.5); Skincolor05_Icon.x = 1686; Skincolor05_Icon.y = 870; Skincolor06_Icon = this.add.button(0,0,"skincolor06_icon",function() { this.Body_fnc("body0006",BodyX,BodyY); },this); Skincolor06_Icon.anchor.setTo(0.5,0.5); Skincolor06_Icon.x = 1416; Skincolor06_Icon.y = 1046; Skincolor07_Icon = this.add.button(0,0,"skincolor07_icon",function() { this.Body_fnc("body0007",BodyX,BodyY); },this); Skincolor07_Icon.anchor.setTo(0.5,0.5); Skincolor07_Icon.x = 1185; Skincolor07_Icon.y = 535; /*finally, we add the Skincolor Icons in a group called Skincolor_Group*/ Skincolor_Group = this.add.group(); Skincolor_Group.add(Skincolor01_Icon); Skincolor_Group.add(Skincolor02_Icon); Skincolor_Group.add(Skincolor03_Icon); Skincolor_Group.add(Skincolor04_Icon); Skincolor_Group.add(Skincolor05_Icon); Skincolor_Group.add(Skincolor06_Icon); Skincolor_Group.add(Skincolor07_Icon); Skincolor_Group.visible = false; //add the starsue logo button Starsue_Logo = this.add.button(0,0,"starsue_btn",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("http://www.starsue.net/","_blank"); },this); Starsue_Logo.anchor.setTo(0.5,0.5); Starsue_Logo.x = 1445; Starsue_Logo.y = 191; Starsue_Logo.animations.add("StarsueAnim",[0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29, 29,29,29,29,29,29,29,29,29,29, 29,29,29,29,29,29,29,29,29,29, 29,29,29,29,29,29,29,29,29,29, 29,29,29,29,29,29,29,29,29,29],30,true); Starsue_Logo.animations.play("StarsueAnim"); Starsue_Logo.events.onInputOver.add(function() { //play the starsue sound effects StarsueSfx.play(); Starsue_Logo.scale.setTo(1.1,1.1); },this); Starsue_Logo.events.onInputOut.add(function() { Starsue_Logo.scale.setTo(1,1); },this); //add the buy doll button Buy_Doll = this.add.button(0,0,"buy_doll_btn",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("https://www.amazon.it/b?node=7342347031&_encoding=UTF8&camp=3370&creative=23322&linkCode=ur2&tag=winclu01-21/ref=starsue.net","_blank"); },this,1,0,2); Buy_Doll.anchor.setTo(0.5,0.5); Buy_Doll.x = 203; Buy_Doll.y = 1373; //add the shuffle button Shuffle_Btn = this.add.button(0,0,"shuffle_btn",function() { /*this functions will shuffle the Hair, Clothes, Hair Highlights, Lips, Shoes, Bottoms, Socks and Extras (Wings)*/ this.HairBangsShuffle_fnc(); this.ClothesShuffle_fnc(); this.HlShuffle_fnc(); this.LipsShuffle_fnc(); this.ShoesShuffle_fnc(); this.BottomsShuffle_fnc(); this.SocksShuffle_fnc(); this.ExtrasShuffle_fnc(); },this,1,0,2); Shuffle_Btn.anchor.setTo(0.5,0.5); Shuffle_Btn.x = 1295; Shuffle_Btn.y = 1364; //add the Show buttons Show_Btn = this.add.button(0,0,"show_btn",function() { Extras.inputEnabled = false; Hair.inputEnabled = false; Socks.inputEnabled = false; Bottoms.inputEnabled = false; Clothes.inputEnabled = false; Eye_Left.inputEnabled = false; Eye_Right.inputEnabled = false; Lips.inputEnabled = false; Bang.inputEnabled = false; Shoes.inputEnabled = false; //set the Character_Group size to normal this.NormalSize_fnc(); /*Set the Character_Group x position to 0 to make the doll position itself in the center of the screen*/ Character_Group.x = 0; /*hide all the dress up scene menus*/ Border.visible = false; Hair_Btn.visible = false; Hl_Btn.visible = false; Eye_Btn.visible = false; Eyeshadow_Btn.visible = false; Lips_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; Skintone_Btn.visible = false; Starsue_Logo.visible = false; Shuffle_Btn.visible = false; Show_Btn.visible = false; Reset_Btn.visible = false; Hair_Btn_Group.visible = false; Hl_Group.visible = false; Eye_Color_Group.visible = false; Eyeshadow_Group.visible = false; Lips_Group.visible = false; Tops_Group.visible = false; Bottoms_Group.visible = false; Dress_Group.visible = false; Shoes_Group.visible = false; Socks_Group.visible = false; Extras_Group.visible = false; Skincolor_Group.visible = false; //show the replay, save, more games and end credits buttons StarSue_Print.visible = true; Replay_Btn.visible = true; Save_Btn.visible = true; MoreGames_Btn.visible = true; EndCredits_Btn.visible = true; },this,1,0,2); Show_Btn.anchor.setTo(0.5,0.5); Show_Btn.x = Shuffle_Btn.x + Shuffle_Btn.width + 5; Show_Btn.y = Shuffle_Btn.y; Reset_Btn = this.add.button(0,0,"reset_btn",function() { //Resets the doll hairColor = 0; hlColor = 0; lipsColor = 0; this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y); this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y); this.BangColor_fnc("bang01_0010","Bang01",Bang01X,Bang01Y); this.HairColor_fnc("hair01_0010","Hair01",Hair01X,Hair01Y); this.Eye_fnc("eye_left0008",Eye_LeftX,Eye_LeftY,"eye_right0008",Eye_RightX,Eye_RightY); this.Eyeshadow_fnc("eyeshadow_left01",Eyeshadow_LeftX,Eyeshadow_LeftY,"eyeshadow_right01",Eyeshadow_RightX,Eyeshadow_RightY); this.Lips_fnc("lips01_0006","Lips01",Lips01X,Lips01Y,true,"teeth01"); this.Body_fnc("body0004",BodyX,BodyY); Bra.visible = true; Panty.visible = true; Bang_Hl.visible = false; Hair_Hl.visible = false; Eyeshadow_Left.visible = false; Eyeshadow_Right.visible = false; Clothes.visible = false; Bottoms.visible = false; Socks.visible = false; Shoes.visible = false; Extras.visible = false; this.NormalSize_fnc(); },this,1,0,2); Reset_Btn.anchor.setTo(0.5,0.5); Reset_Btn.x = Show_Btn.x + Show_Btn.width + 5; Reset_Btn.y = Show_Btn.y; //End Screen Buttons StarSue_Print = this.add.button(1710,84,"starsue_print",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("http://www.starsue.net/","_blank"); },this); StarSue_Print.anchor.setTo(0.5,0.5); StarSue_Print.events.onInputDown.add(function(){StarSue_Print.scale.setTo(0.9,0.9);},this); StarSue_Print.events.onInputUp.add(function(){StarSue_Print.scale.setTo(1,1);},this); StarSue_Print.animations.add("PrintAnim",[0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29, 29,29,29,29,29,29,29,29,29,29, 29,29,29,29,29,29,29,29,29,29, 29,29,29,29,29,29,29,29,29,29, 29,29,29,29,29,29,29,29,29,29],30,true); StarSue_Print.animations.play("PrintAnim"); StarSue_Print.visible = false; Replay_Btn = this.add.button(0,0,"replay_btn",function() { Extras.inputEnabled = true; Hair.inputEnabled = true; Socks.inputEnabled = true; Bottoms.inputEnabled = true; Clothes.inputEnabled = true; Eye_Left.inputEnabled = true; Eye_Right.inputEnabled = true; Lips.inputEnabled = true; Bang.inputEnabled = true; Shoes.inputEnabled = true; /*hide all the end screen buttons*/ Replay_Btn.visible = false; Save_Btn.visible = false; MoreGames_Btn.visible = false; EndCredits_Btn.visible = false; StarSue_Print.visible = false; /*Show all the dress up scene buttons*/ Border.visible = true; Hair_Btn.visible = true; Hl_Btn.visible = true; Eye_Btn.visible = true; Eyeshadow_Btn.visible = true; Lips_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; Skintone_Btn.visible = true; Starsue_Logo.visible = true; Shuffle_Btn.visible = true; Show_Btn.visible = true; Reset_Btn.visible = true; this.NormalSize_fnc(); /*this is where we are going to use the openedMenu variable that we created a while ago, it is pretty much explanatory. :) */ if(openedMenu == 1){Hair_Btn_Group.visible = true;} if(openedMenu == 2){Hl_Group.visible = true;} if(openedMenu == 3){Eye_Color_Group.visible = true;} if(openedMenu == 4){Eyeshadow_Group.visible = true;} if(openedMenu == 5){Lips_Group.visible = true;} if(openedMenu == 6){Tops_Group.visible = true;} if(openedMenu == 7){Bottoms_Group.visible = true;} if(openedMenu == 8){Dress_Group.visible = true;} if(openedMenu == 9){Shoes_Group.visible = true;} if(openedMenu == 10){Socks_Group.visible = true;} if(openedMenu == 11){Extras_Group.visible = true;} if(openedMenu == 12){Skincolor_Group.visible = true;} },this,1,0,2); Replay_Btn.anchor.setTo(0.5,0.5); Replay_Btn.x = 1827; Replay_Btn.y = 831; Replay_Btn.visible = false; Save_Btn = this.add.button(0,0,"save_btn",function() { /*this SaveScreenshot function will capture and save a screenshot at the end screen*/ this.SaveScreenshot(); },this,1,0,2); Save_Btn.anchor.setTo(0.5,0.5); Save_Btn.x = Replay_Btn.x; Save_Btn.y = Replay_Btn.y + Replay_Btn.height - 5; Save_Btn.visible = false; MoreGames_Btn = this.add.button(0,0,"moregames_btn",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("http://www.starsue.net/","_blank"); },this,1,0,2); MoreGames_Btn.anchor.setTo(0.5,0.5); MoreGames_Btn.x = Save_Btn.x; MoreGames_Btn.y = Save_Btn.y + Save_Btn.height - 5; MoreGames_Btn.visible = false; EndCredits_Btn = this.add.button(0,0,"endcredits_btn",function() { Credits_Btn.scale.setTo(1,1); //scaled the button back to it's normal size Credits_Btn.visible = false; //hide the Credits_Btn Credits_Group.visible = true; //make the Credits_Group visible //disable all buttons that is not meant to be clickable when Credits shows up EndCredits_Btn.inputEnabled = false; Replay_Btn.inputEnabled = false; Save_Btn.inputEnabled = false; MoreGames_Btn.inputEnabled = false; },this,1,0,2); EndCredits_Btn.anchor.setTo(0.5,0.5); EndCredits_Btn.x = MoreGames_Btn.x; EndCredits_Btn.y = MoreGames_Btn.y + MoreGames_Btn.height - 5; EndCredits_Btn.visible = false; //Credits Screen_Effect = this.add.sprite(0,0,"screen_effect"); Credits_Text = this.add.sprite(0,0,"credits_text"); Credits_Text.anchor.setTo(0.5,0.5); Credits_Text.x = this.world.centerX; Credits_Text.y = this.world.centerY - 120; Starsue_Credits = this.add.button(0,0,"starsue_credits",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("http://www.starsue.net/","_blank"); },this); Starsue_Credits.anchor.setTo(0.5,0.5); Starsue_Credits.x = 392; Starsue_Credits.y = 1055; Winx_Club_Credits = this.add.button(0,0,"winx_club_credits",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("http://www.winxclub.com/en","_blank");// },this); Winx_Club_Credits.anchor.setTo(0.5,0.5); Winx_Club_Credits.x = 1045; Winx_Club_Credits.y = 1040; Rainbow_Logo = this.add.button(0,0,"rainbow_logo",function() { //this will open a new window when we click this button //you can change the link, but make sure the link is inside the quotes window.open("<link>"),"_blank"); window.open("http://www.rbw.it/en/","_blank");// },this); Rainbow_Logo.anchor.setTo(0.5,0.5); Rainbow_Logo.x = 1612; Rainbow_Logo.y = 1037; Close_Btn = this.add.sprite(0,0,"close_btn"); Close_Btn.anchor.setTo(0.5,0.5); Close_Btn.x = 1697; Close_Btn.y = 309; Close_Btn.inputEnabled = true; Close_Btn.events.onInputDown.add(function() { Close_Btn.scale.setTo(0.9,0.9); },this); Close_Btn.events.onInputUp.add(function() { Close_Btn.scale.setTo(1,1); Credits_Group.visible = false; Credits_Btn.visible = true; //enable all buttons that is meant to be clickable when Credits is closed EndCredits_Btn.inputEnabled = true; Replay_Btn.inputEnabled = true; Save_Btn.inputEnabled = true; MoreGames_Btn.inputEnabled = true; },this); //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(Starsue_Credits); Credits_Group.add(Winx_Club_Credits); Credits_Group.add(Rainbow_Logo); Credits_Group.add(Close_Btn); Credits_Group.visible = false; //-----------------------------------------------------------// //Sound_Btn Sound_Btn = this.add.button(0,0,"sound_btn", function() { /*if not MuteBool(or MuteBool = false) then (similar to flash) goto Frame 1 then set the BgMusic volume to 0 and then MuteBool = true (muted)*/ if(!MuteBool) { Sound_Btn.frame = 1; BgMusic.volume = 0; MuteBool = true; } /*else if MuteBool(or MuteBool = true) then (similar to flash) goto Frame 0 then set the BgMusic volume to 0.7 and then MuteBool = false (not muted)*/ else if(MuteBool) { Sound_Btn.frame = 0; BgMusic.volume = 0.7; MuteBool = false; } },this); Sound_Btn.anchor.setTo(0.5,0.5); Sound_Btn.x = 50; Sound_Btn.y = 41; /*We add this to check the sound at the very begginning of the game if the BgMusic is muted or not. if not muted then goto frame 0. Else if muted goto frame 1*/ if(!MuteBool) { Sound_Btn.frame = 0; } else if(MuteBool) { Sound_Btn.frame = 1; } //--------------------------------------------------------------------------// /*PosText will print the X and Y of the image that you will add in this.debug_fnc(<Image>);*/ /*Note: comment or delete this part out after debugging the game. Thanks! :) */ /*PosText = this.add.text(1680,110,"X:" + "\n" + "Y:",{font:"100px Arial",fill:"000000"}); PosText.anchor.setTo(0.5,0.5);*/ }, 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*/ Replay_Btn.visible = false; Save_Btn.visible = false; MoreGames_Btn.visible = false; EndCredits_Btn.visible = false; Sound_Btn.visible = false; Buy_Doll.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', 'winx-club-harmonix-style.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*/ Replay_Btn.visible = true; Save_Btn.visible = true; MoreGames_Btn.visible = true; EndCredits_Btn.visible = true; Sound_Btn.visible = true; Buy_Doll.visible = true; },this); }, CheckOverlap: function(Obj,TargetObj) { //this function will check if the object you are dragging is overlapping with the target object var Obj1Bounds = Obj.getBounds(); //get the first objects bounds var Obj2Bounds = TargetObj.getBounds(); //get the target/second objects bounds return Phaser.Rectangle.intersects(Obj1Bounds,Obj2Bounds); /*return true/false if the two objects are intersecting*/ }, DragObject_fnc: function(ObjToDrag) { /*Drag the ObjToDrag. We set it to false so that when you click on an object, the mouse pointer will not go to the anchor point of the object to drag*/ ObjToDrag.input.enableDrag(false); }, 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*/ Character_Group.x = -500; Character_Group.y = 20; Character_Group.scale.setTo(1,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)*/ Character_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)*/ Character_Group.x = -2500; Character_Group.y = -420; Character_Group.scale.setTo(3.03,3.03); /*this will set the smoothness filter for all the graphics/assets that are in the Character_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.*/ Character_Group.setAll("smoothed",false); }, /**Note: we're not going to edit that much in any of this functions if we're to implement new graphics for this game. I will add an ***EDIT THIS*** sign and a comment on how to edit to the codes that needs very little editing when implementing new graphics*/ 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,function() { hairColor = 0; //default color this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y); //default hair this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y); //default bang },this); 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(Hair_Hl.visible && HairName == "Hair01") { /* ***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.Hair_Hl_fnc("hair_hl01_0018","HairHl01",HairHl01X,HairHl01Y);} and so on.... just copy and paste the if statements and change the numbers accordingly*/ if(hlColor == 1){this.Hair_Hl_fnc("hair_hl01_0001","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 2){this.Hair_Hl_fnc("hair_hl01_0002","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 3){this.Hair_Hl_fnc("hair_hl01_0003","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 4){this.Hair_Hl_fnc("hair_hl01_0004","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 5){this.Hair_Hl_fnc("hair_hl01_0005","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 6){this.Hair_Hl_fnc("hair_hl01_0006","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 7){this.Hair_Hl_fnc("hair_hl01_0007","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 8){this.Hair_Hl_fnc("hair_hl01_0008","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 9){this.Hair_Hl_fnc("hair_hl01_0009","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 10){this.Hair_Hl_fnc("hair_hl01_0010","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 11){this.Hair_Hl_fnc("hair_hl01_0011","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 12){this.Hair_Hl_fnc("hair_hl01_0012","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 13){this.Hair_Hl_fnc("hair_hl01_0013","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 14){this.Hair_Hl_fnc("hair_hl01_0014","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 15){this.Hair_Hl_fnc("hair_hl01_0015","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 16){this.Hair_Hl_fnc("hair_hl01_0016","HairHl01",HairHl01X,HairHl01Y);} if(hlColor == 17){this.Hair_Hl_fnc("hair_hl01_0017","HairHl01",HairHl01X,HairHl01Y);} } if(Hair_Hl.visible && HairName == "Hair02") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl02_0001","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 2){this.Hair_Hl_fnc("hair_hl02_0002","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 3){this.Hair_Hl_fnc("hair_hl02_0003","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 4){this.Hair_Hl_fnc("hair_hl02_0004","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 5){this.Hair_Hl_fnc("hair_hl02_0005","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 6){this.Hair_Hl_fnc("hair_hl02_0006","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 7){this.Hair_Hl_fnc("hair_hl02_0007","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 8){this.Hair_Hl_fnc("hair_hl02_0008","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 9){this.Hair_Hl_fnc("hair_hl02_0009","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 10){this.Hair_Hl_fnc("hair_hl02_0010","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 11){this.Hair_Hl_fnc("hair_hl02_0011","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 12){this.Hair_Hl_fnc("hair_hl02_0012","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 13){this.Hair_Hl_fnc("hair_hl02_0013","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 14){this.Hair_Hl_fnc("hair_hl02_0014","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 15){this.Hair_Hl_fnc("hair_hl02_0015","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 16){this.Hair_Hl_fnc("hair_hl02_0016","HairHl02",HairHl02X,HairHl02Y);} if(hlColor == 17){this.Hair_Hl_fnc("hair_hl02_0017","HairHl02",HairHl02X,HairHl02Y);} } if(Hair_Hl.visible && HairName == "Hair03") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl03_0001","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 2){this.Hair_Hl_fnc("hair_hl03_0002","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 3){this.Hair_Hl_fnc("hair_hl03_0003","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 4){this.Hair_Hl_fnc("hair_hl03_0004","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 5){this.Hair_Hl_fnc("hair_hl03_0005","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 6){this.Hair_Hl_fnc("hair_hl03_0006","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 7){this.Hair_Hl_fnc("hair_hl03_0007","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 8){this.Hair_Hl_fnc("hair_hl03_0008","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 9){this.Hair_Hl_fnc("hair_hl03_0009","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 10){this.Hair_Hl_fnc("hair_hl03_0010","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 11){this.Hair_Hl_fnc("hair_hl03_0011","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 12){this.Hair_Hl_fnc("hair_hl03_0012","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 13){this.Hair_Hl_fnc("hair_hl03_0013","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 14){this.Hair_Hl_fnc("hair_hl03_0014","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 15){this.Hair_Hl_fnc("hair_hl03_0015","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 16){this.Hair_Hl_fnc("hair_hl03_0016","HairHl03",HairHl03X,HairHl03Y);} if(hlColor == 17){this.Hair_Hl_fnc("hair_hl03_0017","HairHl03",HairHl03X,HairHl03Y);} } if(Hair_Hl.visible && HairName == "Hair04") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl04_0001","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 2){this.Hair_Hl_fnc("hair_hl04_0002","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 3){this.Hair_Hl_fnc("hair_hl04_0003","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 4){this.Hair_Hl_fnc("hair_hl04_0004","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 5){this.Hair_Hl_fnc("hair_hl04_0005","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 6){this.Hair_Hl_fnc("hair_hl04_0006","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 7){this.Hair_Hl_fnc("hair_hl04_0007","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 8){this.Hair_Hl_fnc("hair_hl04_0008","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 9){this.Hair_Hl_fnc("hair_hl04_0009","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 10){this.Hair_Hl_fnc("hair_hl04_0010","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 11){this.Hair_Hl_fnc("hair_hl04_0011","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 12){this.Hair_Hl_fnc("hair_hl04_0012","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 13){this.Hair_Hl_fnc("hair_hl04_0013","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 14){this.Hair_Hl_fnc("hair_hl04_0014","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 15){this.Hair_Hl_fnc("hair_hl04_0015","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 16){this.Hair_Hl_fnc("hair_hl04_0016","HairHl04",HairHl04X,HairHl04Y);} if(hlColor == 17){this.Hair_Hl_fnc("hair_hl04_0017","HairHl04",HairHl04X,HairHl04Y);} } if(Hair_Hl.visible && HairName == "Hair05") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl05_0001","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 2){this.Hair_Hl_fnc("hair_hl05_0002","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 3){this.Hair_Hl_fnc("hair_hl05_0003","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 4){this.Hair_Hl_fnc("hair_hl05_0004","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 5){this.Hair_Hl_fnc("hair_hl05_0005","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 6){this.Hair_Hl_fnc("hair_hl05_0006","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 7){this.Hair_Hl_fnc("hair_hl05_0007","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 8){this.Hair_Hl_fnc("hair_hl05_0008","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 9){this.Hair_Hl_fnc("hair_hl05_0009","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 10){this.Hair_Hl_fnc("hair_hl05_0010","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 11){this.Hair_Hl_fnc("hair_hl05_0011","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 12){this.Hair_Hl_fnc("hair_hl05_0012","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 13){this.Hair_Hl_fnc("hair_hl05_0013","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 14){this.Hair_Hl_fnc("hair_hl05_0014","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 15){this.Hair_Hl_fnc("hair_hl05_0015","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 16){this.Hair_Hl_fnc("hair_hl05_0016","HairHl05",HairHl05X,HairHl05Y);} if(hlColor == 17){this.Hair_Hl_fnc("hair_hl05_0017","HairHl05",HairHl05X,HairHl05Y);} } if(Hair_Hl.visible && HairName == "Hair06") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl06_0001","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 2){this.Hair_Hl_fnc("hair_hl06_0002","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 3){this.Hair_Hl_fnc("hair_hl06_0003","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 4){this.Hair_Hl_fnc("hair_hl06_0004","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 5){this.Hair_Hl_fnc("hair_hl06_0005","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 6){this.Hair_Hl_fnc("hair_hl06_0006","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 7){this.Hair_Hl_fnc("hair_hl06_0007","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 8){this.Hair_Hl_fnc("hair_hl06_0008","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 9){this.Hair_Hl_fnc("hair_hl06_0009","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 10){this.Hair_Hl_fnc("hair_hl06_0010","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 11){this.Hair_Hl_fnc("hair_hl06_0011","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 12){this.Hair_Hl_fnc("hair_hl06_0012","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 13){this.Hair_Hl_fnc("hair_hl06_0013","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 14){this.Hair_Hl_fnc("hair_hl06_0014","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 15){this.Hair_Hl_fnc("hair_hl06_0015","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 16){this.Hair_Hl_fnc("hair_hl06_0016","HairHl06",HairHl06X,HairHl06Y);} if(hlColor == 17){this.Hair_Hl_fnc("hair_hl06_0017","HairHl06",HairHl06X,HairHl06Y);} } /*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_fnc: function(BangKey,BangName,BangX,BangY) { if(Bang.key != BangKey) { Bang.destroy(); Bang = this.add.button(0,0,BangKey,function() { hairColor = 0; this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y); this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y); },this); Bang.anchor.setTo(0.5,0.5); Bang.input.pixelPerfectClick = true; Bang.x = BangX; Bang.y = BangY; Bang.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(Bang_Hl.visible && 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);} */ if(hlColor == 1){this.Bang_Hl_fnc("bang_hl01_0001","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 2){this.Bang_Hl_fnc("bang_hl01_0002","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 3){this.Bang_Hl_fnc("bang_hl01_0003","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 4){this.Bang_Hl_fnc("bang_hl01_0004","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 5){this.Bang_Hl_fnc("bang_hl01_0005","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 6){this.Bang_Hl_fnc("bang_hl01_0006","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 7){this.Bang_Hl_fnc("bang_hl01_0007","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 8){this.Bang_Hl_fnc("bang_hl01_0008","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 9){this.Bang_Hl_fnc("bang_hl01_0009","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 10){this.Bang_Hl_fnc("bang_hl01_0010","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 11){this.Bang_Hl_fnc("bang_hl01_0011","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 12){this.Bang_Hl_fnc("bang_hl01_0012","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 13){this.Bang_Hl_fnc("bang_hl01_0013","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 14){this.Bang_Hl_fnc("bang_hl01_0014","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 15){this.Bang_Hl_fnc("bang_hl01_0015","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 16){this.Bang_Hl_fnc("bang_hl01_0016","BangHl01",BangHl01X,BangHl01Y);} if(hlColor == 17){this.Bang_Hl_fnc("bang_hl01_0017","BangHl01",BangHl01X,BangHl01Y);} } if(Bang_Hl.visible && BangName == "Bang02") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl02_0001","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 2){this.Bang_Hl_fnc("bang_hl02_0002","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 3){this.Bang_Hl_fnc("bang_hl02_0003","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 4){this.Bang_Hl_fnc("bang_hl02_0004","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 5){this.Bang_Hl_fnc("bang_hl02_0005","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 6){this.Bang_Hl_fnc("bang_hl02_0006","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 7){this.Bang_Hl_fnc("bang_hl02_0007","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 8){this.Bang_Hl_fnc("bang_hl02_0008","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 9){this.Bang_Hl_fnc("bang_hl02_0009","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 10){this.Bang_Hl_fnc("bang_hl02_0010","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 11){this.Bang_Hl_fnc("bang_hl02_0011","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 12){this.Bang_Hl_fnc("bang_hl02_0012","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 13){this.Bang_Hl_fnc("bang_hl02_0013","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 14){this.Bang_Hl_fnc("bang_hl02_0014","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 15){this.Bang_Hl_fnc("bang_hl02_0015","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 16){this.Bang_Hl_fnc("bang_hl02_0016","BangHl02",BangHl02X,BangHl02Y);} if(hlColor == 17){this.Bang_Hl_fnc("bang_hl02_0017","BangHl02",BangHl02X,BangHl02Y);} } if(Bang_Hl.visible && BangName == "Bang03") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl03_0001","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 2){this.Bang_Hl_fnc("bang_hl03_0002","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 3){this.Bang_Hl_fnc("bang_hl03_0003","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 4){this.Bang_Hl_fnc("bang_hl03_0004","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 5){this.Bang_Hl_fnc("bang_hl03_0005","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 6){this.Bang_Hl_fnc("bang_hl03_0006","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 7){this.Bang_Hl_fnc("bang_hl03_0007","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 8){this.Bang_Hl_fnc("bang_hl03_0008","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 9){this.Bang_Hl_fnc("bang_hl03_0009","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 10){this.Bang_Hl_fnc("bang_hl03_0010","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 11){this.Bang_Hl_fnc("bang_hl03_0011","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 12){this.Bang_Hl_fnc("bang_hl03_0012","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 13){this.Bang_Hl_fnc("bang_hl03_0013","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 14){this.Bang_Hl_fnc("bang_hl03_0014","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 15){this.Bang_Hl_fnc("bang_hl03_0015","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 16){this.Bang_Hl_fnc("bang_hl03_0016","BangHl03",BangHl03X,BangHl03Y);} if(hlColor == 17){this.Bang_Hl_fnc("bang_hl03_0017","BangHl03",BangHl03X,BangHl03Y);} } if(Bang_Hl.visible && BangName == "Bang04") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl04_0001","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 2){this.Bang_Hl_fnc("bang_hl04_0002","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 3){this.Bang_Hl_fnc("bang_hl04_0003","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 4){this.Bang_Hl_fnc("bang_hl04_0004","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 5){this.Bang_Hl_fnc("bang_hl04_0005","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 6){this.Bang_Hl_fnc("bang_hl04_0006","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 7){this.Bang_Hl_fnc("bang_hl04_0007","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 8){this.Bang_Hl_fnc("bang_hl04_0008","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 9){this.Bang_Hl_fnc("bang_hl04_0009","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 10){this.Bang_Hl_fnc("bang_hl04_0010","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 11){this.Bang_Hl_fnc("bang_hl04_0011","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 12){this.Bang_Hl_fnc("bang_hl04_0012","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 13){this.Bang_Hl_fnc("bang_hl04_0013","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 14){this.Bang_Hl_fnc("bang_hl04_0014","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 15){this.Bang_Hl_fnc("bang_hl04_0015","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 16){this.Bang_Hl_fnc("bang_hl04_0016","BangHl04",BangHl04X,BangHl04Y);} if(hlColor == 17){this.Bang_Hl_fnc("bang_hl04_0017","BangHl04",BangHl04X,BangHl04Y);} } if(Bang_Hl.visible && BangName == "Bang05") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl05_0001","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 2){this.Bang_Hl_fnc("bang_hl05_0002","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 3){this.Bang_Hl_fnc("bang_hl05_0003","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 4){this.Bang_Hl_fnc("bang_hl05_0004","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 5){this.Bang_Hl_fnc("bang_hl05_0005","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 6){this.Bang_Hl_fnc("bang_hl05_0006","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 7){this.Bang_Hl_fnc("bang_hl05_0007","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 8){this.Bang_Hl_fnc("bang_hl05_0008","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 9){this.Bang_Hl_fnc("bang_hl05_0009","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 10){this.Bang_Hl_fnc("bang_hl05_0010","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 11){this.Bang_Hl_fnc("bang_hl05_0011","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 12){this.Bang_Hl_fnc("bang_hl05_0012","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 13){this.Bang_Hl_fnc("bang_hl05_0013","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 14){this.Bang_Hl_fnc("bang_hl05_0014","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 15){this.Bang_Hl_fnc("bang_hl05_0015","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 16){this.Bang_Hl_fnc("bang_hl05_0016","BangHl05",BangHl05X,BangHl05Y);} if(hlColor == 17){this.Bang_Hl_fnc("bang_hl05_0017","BangHl05",BangHl05X,BangHl05Y);} } if(Bang_Hl.visible && BangName == "Bang06") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl06_0001","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 2){this.Bang_Hl_fnc("bang_hl06_0002","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 3){this.Bang_Hl_fnc("bang_hl06_0003","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 4){this.Bang_Hl_fnc("bang_hl06_0004","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 5){this.Bang_Hl_fnc("bang_hl06_0005","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 6){this.Bang_Hl_fnc("bang_hl06_0006","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 7){this.Bang_Hl_fnc("bang_hl06_0007","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 8){this.Bang_Hl_fnc("bang_hl06_0008","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 9){this.Bang_Hl_fnc("bang_hl06_0009","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 10){this.Bang_Hl_fnc("bang_hl06_0010","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 11){this.Bang_Hl_fnc("bang_hl06_0011","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 12){this.Bang_Hl_fnc("bang_hl06_0012","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 13){this.Bang_Hl_fnc("bang_hl06_0013","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 14){this.Bang_Hl_fnc("bang_hl06_0014","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 15){this.Bang_Hl_fnc("bang_hl06_0015","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 16){this.Bang_Hl_fnc("bang_hl06_0016","BangHl06",BangHl06X,BangHl06Y);} if(hlColor == 17){this.Bang_Hl_fnc("bang_hl06_0017","BangHl06",BangHl06X,BangHl06Y);} } /*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(); }, BangColor_fnc: function(BangKey,BangName,BangX,BangY) { Bang.destroy(); Bang = this.add.button(0,0,BangKey,function() { hairColor = 0; this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y); this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y); },this); Bang.anchor.setTo(0.5,0.5); Bang.input.pixelPerfectClick = true; Bang.x = BangX; Bang.y = BangY; Bang.name = BangName; /*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; /*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; /*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(); }, HairColor_fnc: function(HairKey,HairName,HairX,HairY) { Hair.destroy(); Hair = this.add.button(0,0,HairKey,function() { hairColor = 0; this.Hair_fnc("hair01_0010","Hair01",Hair01X,Hair01Y); this.Bang_fnc("bang01_0010","Bang01",Bang01X,Bang01Y); },this); Hair.anchor.setTo(0.5,0.5); Hair.input.pixelPerfectClick = true; Hair.x = HairX; Hair.y = HairY; Hair.name = HairName; /*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(); }, Eye_fnc: function(EyeLeftKey,EyeLeftX,EyeLeftY,EyeRightKey,EyeRightX,EyeRightY) { Eye_Left.destroy(); Eye_Left = this.add.button(0,0,EyeLeftKey,function() {this.Eye_fnc("eye_left0008",Eye_LeftX,Eye_LeftY,"eye_right0008",Eye_RightX,Eye_RightY);},this); Eye_Left.anchor.setTo(0.5,0.5); Eye_Left.input.pixelPerfectClick = true; Eye_Left.x = EyeLeftX; Eye_Left.y = EyeLeftY; Eye_Right.destroy(); Eye_Right = this.add.button(0,0,EyeRightKey,function() {this.Eye_fnc("eye_left0008",Eye_LeftX,Eye_LeftY,"eye_right0008",Eye_RightX,Eye_RightY);},this); Eye_Right.anchor.setTo(0.5,0.5); Eye_Right.input.pixelPerfectClick = true; Eye_Right.x = EyeRightX; Eye_Right.y = EyeRightY; /*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(); }, Eyeshadow_fnc: function(EyeshadowLeftKey,EyeshadowLeftX,EyeshadowLeftY,EyeshadowRightKey,EyeshadowRightX,EyeshadowRightY) { Eyeshadow_Left.destroy(); Eyeshadow_Left = this.add.sprite(0,0,EyeshadowLeftKey); Eyeshadow_Left.anchor.setTo(0.5,0.5); Eyeshadow_Left.x = EyeshadowLeftX; Eyeshadow_Left.y = EyeshadowLeftY; Eyeshadow_Right.destroy(); Eyeshadow_Right = this.add.sprite(0,0,EyeshadowRightKey); Eyeshadow_Right.anchor.setTo(0.5,0.5); Eyeshadow_Right.x = EyeshadowRightX; Eyeshadow_Right.y = EyeshadowRightY; /*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,HasTeeth,TeethKey) { Lips.destroy(); Lips = this.add.button(0,0,LipsKey,function(){this.Lips_fnc("lips01_0006","Lips01",Lips01X,Lips01Y,true,"teeth01");},this); Lips.anchor.setTo(0.5,0.5); Lips.input.pixelPerfectClick = true; Lips.x = LipsX; Lips.y = LipsY; Lips.name = LipsName; if(HasTeeth) { Teeth.destroy(); Teeth = this.add.sprite(0,0,TeethKey); Teeth.anchor.setTo(0.5,0.5); Teeth.x = TeethX; Teeth.y = TeethY; } else { Teeth.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(); }, Clothes_fnc: function(ClothesKey,ClothesName,ClothesX,ClothesY) { Clothes.destroy(); Clothes = this.add.button(0,0,ClothesKey,function() { Clothes.visible = false; Bra.visible = true; },this); 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,function() { Bottoms.visible = false; },this); Bottoms.anchor.setTo(0.5,0.5); Bottoms.input.pixelPerfectClick = true; Bottoms.x = BottomsX; Bottoms.y = BottomsY; Bottoms.name = BottomsName; /*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(); }, Extras_fnc: function(Extras_Icon,ExtrasKey,ExtrasName,ExtrasX,ExtrasY) { if(this.CheckOverlap(Extras_Icon,Hit_Box)) { Extras.destroy(); Extras = this.add.button(0,0,ExtrasKey,function() { Extras.visible = false; },this); Extras.anchor.setTo(0.5,0.5); Extras.x = ExtrasX; Extras.y = ExtrasY; Extras.name = ExtrasName; } /*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(); }, Body_fnc: function(BodyKey,BodyX,BodyY) { Body.destroy(); Body = this.add.sprite(0,0,BodyKey); Body.anchor.setTo(0.5,0.5); Body.x = BodyX; Body.y = BodyY; /*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(); }, 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.*/ Character_Group.remove(Extras); Character_Group.remove(Hair); Character_Group.remove(Hair_Hl); Character_Group.remove(Body); Character_Group.remove(Socks); Character_Group.remove(Hit_Box); Character_Group.remove(Bra); Character_Group.remove(Panty); Character_Group.remove(Shoes); Character_Group.remove(Bottoms); Character_Group.remove(Clothes); Character_Group.remove(Eyes_White); Character_Group.remove(Eye_Left); Character_Group.remove(Eye_Right); Character_Group.remove(Eyeshadow_Left); Character_Group.remove(Eyeshadow_Right); Character_Group.remove(Face_Details); Character_Group.remove(Lips); Character_Group.remove(Teeth); Character_Group.remove(Bang); Character_Group.remove(Bang_Hl); /*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*/ Character_Group.add(Extras); Character_Group.add(Hair); Character_Group.add(Hair_Hl); Character_Group.add(Body); Character_Group.add(Socks); Character_Group.add(Hit_Box); Character_Group.add(Bra); Character_Group.add(Panty); Character_Group.add(Shoes); Character_Group.add(Bottoms); Character_Group.add(Clothes); Character_Group.add(Eyes_White); Character_Group.add(Eye_Left); Character_Group.add(Eye_Right); Character_Group.add(Eyeshadow_Left); Character_Group.add(Eyeshadow_Right); Character_Group.add(Face_Details); Character_Group.add(Lips); Character_Group.add(Teeth); Character_Group.add(Bang); Character_Group.add(Bang_Hl); }, HairBangsShuffle_fnc: function() { /* ***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(hairColor == 18) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0018","Bang01",Bang01X,Bang01Y);} . . . }*/ if(hairColor == 1) { /* ***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: var BangRand = Math.floor(Math.random()*(7-1+1))+1; if(BangRand == 7){this.BangColor_fnc("bang07_0001","Bang07",Bang07X,Bang07Y);}*/ var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0001","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0001","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0001","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0001","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0001","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0001","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0001","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0001","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0001","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0001","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0001","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0001","Hair06",Hair06X,Hair06Y);} } if(hairColor == 2) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0002","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0002","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0002","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0002","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0002","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0002","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0002","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0002","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0002","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0002","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0002","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0002","Hair06",Hair06X,Hair06Y);} } if(hairColor == 3) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0003","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0003","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0003","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0003","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0003","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0003","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0003","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0003","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0003","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0003","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0003","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0003","Hair06",Hair06X,Hair06Y);} } if(hairColor == 4) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0004","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0004","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0004","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0004","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0004","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0004","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0004","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0004","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0004","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0004","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0004","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0004","Hair06",Hair06X,Hair06Y);} } if(hairColor == 5) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0005","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0005","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0005","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0005","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0005","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0005","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0005","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0005","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0005","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0005","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0005","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0005","Hair06",Hair06X,Hair06Y);} } if(hairColor == 6) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0006","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0006","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0006","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0006","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0006","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0006","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0006","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0006","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0006","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0006","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0006","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0006","Hair06",Hair06X,Hair06Y);} } if(hairColor == 7) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0007","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0007","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0007","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0007","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0007","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0007","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0007","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0007","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0007","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0007","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0007","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0007","Hair06",Hair06X,Hair06Y);} } if(hairColor == 8) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0008","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0008","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0008","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0008","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0008","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0008","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0008","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0008","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0008","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0008","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0008","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0008","Hair06",Hair06X,Hair06Y);} } if(hairColor == 9) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0009","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0009","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0009","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0009","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0009","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0009","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0009","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0009","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0009","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0009","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0009","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0009","Hair06",Hair06X,Hair06Y);} } if(hairColor == 10 || hairColor == 0) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0010","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0010","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0010","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0010","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0010","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0010","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0010","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0010","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0010","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0010","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0010","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0010","Hair06",Hair06X,Hair06Y);} } if(hairColor == 11) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0011","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0011","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0011","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0011","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0011","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0011","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0011","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0011","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0011","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0011","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0011","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0011","Hair06",Hair06X,Hair06Y);} } if(hairColor == 12) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0012","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0012","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0012","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0012","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0012","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0012","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0012","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0012","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0012","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0012","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0012","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0012","Hair06",Hair06X,Hair06Y);} } if(hairColor == 13) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0013","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0013","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0013","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0013","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0013","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0013","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0013","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0013","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0013","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0013","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0013","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0013","Hair06",Hair06X,Hair06Y);} } if(hairColor == 14) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0014","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0014","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0014","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0014","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0014","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0014","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0014","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0014","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0014","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0014","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0014","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0014","Hair06",Hair06X,Hair06Y);} } if(hairColor == 15) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0015","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0015","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0015","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0015","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0015","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0015","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0015","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0015","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0015","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0015","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0015","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0015","Hair06",Hair06X,Hair06Y);} } if(hairColor == 16) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0016","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0016","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0016","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0016","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0016","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0016","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0016","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0016","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0016","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0016","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0016","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0016","Hair06",Hair06X,Hair06Y);} } if(hairColor == 17) { var BangRand = Math.floor(Math.random()*(6-1+1))+1; if(BangRand == 1){this.BangColor_fnc("bang01_0017","Bang01",Bang01X,Bang01Y);} if(BangRand == 2){this.BangColor_fnc("bang02_0017","Bang02",Bang02X,Bang02Y);} if(BangRand == 3){this.BangColor_fnc("bang03_0017","Bang03",Bang03X,Bang03Y);} if(BangRand == 4){this.BangColor_fnc("bang04_0017","Bang04",Bang04X,Bang04Y);} if(BangRand == 5){this.BangColor_fnc("bang05_0017","Bang05",Bang05X,Bang05Y);} if(BangRand == 6){this.BangColor_fnc("bang06_0017","Bang06",Bang06X,Bang06Y);} var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.HairColor_fnc("hair01_0017","Hair01",Hair01X,Hair01Y);} if(HairRand == 2){this.HairColor_fnc("hair02_0017","Hair02",Hair02X,Hair02Y);} if(HairRand == 3){this.HairColor_fnc("hair03_0017","Hair03",Hair03X,Hair03Y);} if(HairRand == 4){this.HairColor_fnc("hair04_0017","Hair04",Hair04X,Hair04Y);} if(HairRand == 5){this.HairColor_fnc("hair05_0017","Hair05",Hair05X,Hair05Y);} if(HairRand == 6){this.HairColor_fnc("hair06_0017","Hair06",Hair06X,Hair06Y);} } }, ClothesShuffle_fnc: function() { /* ***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: var BangRand = Math.floor(Math.random()*(61-1+1))+1; if(ClothesRand == 61){this.AddClothes_fnc("dress0061","Dress61",DressX,DressY,true);} */ /*we will use this boolean to check if the doll is wearing a dress or not when we click on the shuffle button*/ var ClothesRand = Math.floor(Math.random()*(60-1+1))+1; if(ClothesRand == 1){this.AddClothes_fnc("dress0001","Dress01",DressX,DressY);} if(ClothesRand == 2){this.AddClothes_fnc("dress0002","Dress02",DressX,DressY);} if(ClothesRand == 3){this.AddClothes_fnc("dress0003","Dress03",DressX,DressY);} if(ClothesRand == 4){this.AddClothes_fnc("dress0004","Dress04",DressX,DressY);} if(ClothesRand == 5){this.AddClothes_fnc("dress0005","Dress05",DressX,DressY);} if(ClothesRand == 6){this.AddClothes_fnc("dress0006","Dress06",DressX,DressY);} if(ClothesRand == 7){this.AddClothes_fnc("dress0007","Dress07",DressX,DressY);} if(ClothesRand == 8){this.AddClothes_fnc("dress0008","Dress08",DressX,DressY);} if(ClothesRand == 9){this.AddClothes_fnc("dress0009","Dress09",DressX,DressY);} if(ClothesRand == 10){this.AddClothes_fnc("dress0010","Dress10",DressX,DressY);} if(ClothesRand == 11){this.AddClothes_fnc("dress0011","Dress11",DressX,DressY);} if(ClothesRand == 12){this.AddClothes_fnc("dress0012","Dress12",DressX,DressY);} if(ClothesRand == 13){this.AddClothes_fnc("dress0013","Dress13",DressX,DressY);} if(ClothesRand == 14){this.AddClothes_fnc("dress0014","Dress14",DressX,DressY);} if(ClothesRand == 15){this.AddClothes_fnc("dress0015","Dress15",DressX,DressY);} if(ClothesRand == 16){this.AddClothes_fnc("dress0016","Dress16",DressX,DressY);} if(ClothesRand == 17){this.AddClothes_fnc("dress0017","Dress17",DressX,DressY);} if(ClothesRand == 18){this.AddClothes_fnc("dress0018","Dress18",DressX,DressY);} if(ClothesRand == 19){this.AddClothes_fnc("dress0019","Dress19",DressX,DressY);} if(ClothesRand == 20){this.AddClothes_fnc("dress0020","Dress20",DressX,DressY);} if(ClothesRand == 21){this.AddClothes_fnc("dress0021","Dress21",DressX,DressY);} if(ClothesRand == 22){this.AddClothes_fnc("dress0022","Dress22",DressX,DressY);} if(ClothesRand == 23){this.AddClothes_fnc("dress0023","Dress23",DressX,DressY);} if(ClothesRand == 24){this.AddClothes_fnc("dress0024","Dress24",DressX,DressY);} if(ClothesRand == 25){this.AddClothes_fnc("dress0025","Dress25",DressX,DressY);} if(ClothesRand == 26){this.AddClothes_fnc("dress0026","Dress26",DressX,DressY);} if(ClothesRand == 27){this.AddClothes_fnc("dress0027","Dress27",DressX,DressY);} if(ClothesRand == 28){this.AddClothes_fnc("dress0028","Dress28",DressX,DressY);} if(ClothesRand == 29){this.AddClothes_fnc("dress0029","Dress29",DressX,DressY);} if(ClothesRand == 30){this.AddClothes_fnc("dress0030","Dress30",DressX,DressY);} if(ClothesRand == 31){this.AddClothes_fnc("tops0001","Top01",TopsX,TopsY);} if(ClothesRand == 32){this.AddClothes_fnc("tops0002","Top02",TopsX,TopsY);} if(ClothesRand == 33){this.AddClothes_fnc("tops0003","Top03",TopsX,TopsY);} if(ClothesRand == 34){this.AddClothes_fnc("tops0004","Top04",TopsX,TopsY);} if(ClothesRand == 35){this.AddClothes_fnc("tops0005","Top05",TopsX,TopsY);} if(ClothesRand == 36){this.AddClothes_fnc("tops0006","Top06",TopsX,TopsY);} if(ClothesRand == 37){this.AddClothes_fnc("tops0007","Top07",TopsX,TopsY);} if(ClothesRand == 38){this.AddClothes_fnc("tops0008","Top08",TopsX,TopsY);} if(ClothesRand == 39){this.AddClothes_fnc("tops0009","Top09",TopsX,TopsY);} if(ClothesRand == 40){this.AddClothes_fnc("tops0010","Top10",TopsX,TopsY);} if(ClothesRand == 41){this.AddClothes_fnc("tops0011","Top11",TopsX,TopsY);} if(ClothesRand == 42){this.AddClothes_fnc("tops0012","Top12",TopsX,TopsY);} if(ClothesRand == 43){this.AddClothes_fnc("tops0013","Top13",TopsX,TopsY);} if(ClothesRand == 44){this.AddClothes_fnc("tops0014","Top14",TopsX,TopsY);} if(ClothesRand == 45){this.AddClothes_fnc("tops0015","Top15",TopsX,TopsY);} if(ClothesRand == 46){this.AddClothes_fnc("tops0016","Top16",TopsX,TopsY);} if(ClothesRand == 47){this.AddClothes_fnc("tops0017","Top17",TopsX,TopsY);} if(ClothesRand == 48){this.AddClothes_fnc("tops0018","Top18",TopsX,TopsY);} if(ClothesRand == 49){this.AddClothes_fnc("tops0019","Top19",TopsX,TopsY);} if(ClothesRand == 50){this.AddClothes_fnc("tops0020","Top20",TopsX,TopsY);} if(ClothesRand == 51){this.AddClothes_fnc("tops0021","Top21",TopsX,TopsY);} if(ClothesRand == 52){this.AddClothes_fnc("tops0022","Top22",TopsX,TopsY);} if(ClothesRand == 53){this.AddClothes_fnc("tops0023","Top23",TopsX,TopsY);} if(ClothesRand == 54){this.AddClothes_fnc("tops0024","Top24",TopsX,TopsY);} if(ClothesRand == 55){this.AddClothes_fnc("tops0025","Top25",TopsX,TopsY);} if(ClothesRand == 56){this.AddClothes_fnc("tops0026","Top26",TopsX,TopsY);} if(ClothesRand == 57){this.AddClothes_fnc("tops0027","Top27",TopsX,TopsY);} if(ClothesRand == 58){this.AddClothes_fnc("tops0028","Top28",TopsX,TopsY);} if(ClothesRand == 59){this.AddClothes_fnc("tops0029","Top29",TopsX,TopsY);} if(ClothesRand == 60){this.AddClothes_fnc("tops0030","Top30",TopsX,TopsY);} if(ClothesRand > 0 && ClothesRand < 31){dressOn = true;} if(ClothesRand > 30){dressOn = false;} }, AddClothes_fnc: function(ClothesKey,ClothesName,ClothesX,ClothesY) { Clothes.destroy(); Clothes = this.add.button(0,0,ClothesKey,function() { Clothes.visible = false; Bra.visible = true; },this); Clothes.anchor.setTo(0.5,0.5); Clothes.x = ClothesX; Clothes.y = ClothesY; Clothes.name = ClothesName; Bra.visible = false; this.SortMainGroup_fnc(); }, HlShuffle_fnc: function() { if(Bang_Hl.visible && Hair_Hl.visible) { /* ***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) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0018","HairHl01",HairHl01X,HairHl01Y);} . . . } */ if(hlColor == 0 || hlColor == 1) { /* ***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.name == "Hair07"){this.Hair_Hl_fnc("hair_hl07_0001","HairHl07",HairHl07X,HairHl07Y);} */ if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0001","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0001","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0001","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0001","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0001","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0001","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0001","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0001","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0001","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0001","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0001","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0001","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 2) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0002","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0002","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0002","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0002","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0002","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0002","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0002","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0002","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0002","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0002","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0002","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0002","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 3) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0003","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0003","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0003","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0003","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0003","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0003","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0003","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0003","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0003","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0003","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0003","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0003","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 4) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0004","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0004","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0004","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0004","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0004","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0004","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0004","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0004","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0004","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0004","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0004","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0004","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 5) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0005","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0005","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0005","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0005","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0005","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0005","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0005","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0005","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0005","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0005","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0005","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0005","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 6) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0006","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0006","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0006","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0006","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0006","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0006","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0006","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0006","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0006","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0006","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0006","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0006","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 7) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0007","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0007","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0007","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0007","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0007","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0007","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0007","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0007","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0007","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0007","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0007","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0007","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 8) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0008","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0008","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0008","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0008","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0008","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0008","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0008","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0008","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0008","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0008","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0008","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0008","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 9) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0009","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0009","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0009","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0009","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0009","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0009","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0009","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0009","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0009","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0009","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0009","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0009","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 10) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0010","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0010","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0010","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0010","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0010","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0010","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0010","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0010","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0010","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0010","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0010","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0010","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 11) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0011","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0011","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0011","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0011","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0011","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0011","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0011","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0011","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0011","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0011","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0011","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0011","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 12) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0012","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0012","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0012","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0012","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0012","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0012","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0012","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0012","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0012","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0012","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0012","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0012","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 13) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0013","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0013","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0013","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0013","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0013","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0013","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0013","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0013","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0013","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0013","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0013","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0013","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 14) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0014","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0014","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0014","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0014","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0014","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0014","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0014","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0014","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0014","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0014","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0014","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0014","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 15) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0015","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0015","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0015","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0015","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0015","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0015","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0015","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0015","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0015","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0015","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0015","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0015","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 16) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0016","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0016","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0016","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0016","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0016","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0016","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0016","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0016","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0016","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0016","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0016","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0016","BangHl06",BangHl06X,BangHl06Y);} } if(hlColor == 17) { if(Hair.name == "Hair01"){this.Hair_Hl_fnc("hair_hl01_0017","HairHl01",HairHl01X,HairHl01Y);} if(Hair.name == "Hair02"){this.Hair_Hl_fnc("hair_hl02_0017","HairHl02",HairHl02X,HairHl02Y);} if(Hair.name == "Hair03"){this.Hair_Hl_fnc("hair_hl03_0017","HairHl03",HairHl03X,HairHl03Y);} if(Hair.name == "Hair04"){this.Hair_Hl_fnc("hair_hl04_0017","HairHl04",HairHl04X,HairHl04Y);} if(Hair.name == "Hair05"){this.Hair_Hl_fnc("hair_hl05_0017","HairHl05",HairHl05X,HairHl05Y);} if(Hair.name == "Hair06"){this.Hair_Hl_fnc("hair_hl06_0017","HairHl06",HairHl06X,HairHl06Y);} if(Bang.name == "Bang01"){this.Bang_Hl_fnc("bang_hl01_0017","BangHl01",BangHl01X,BangHl01Y);} if(Bang.name == "Bang02"){this.Bang_Hl_fnc("bang_hl02_0017","BangHl02",BangHl02X,BangHl02Y);} if(Bang.name == "Bang03"){this.Bang_Hl_fnc("bang_hl03_0017","BangHl03",BangHl03X,BangHl03Y);} if(Bang.name == "Bang04"){this.Bang_Hl_fnc("bang_hl04_0017","BangHl04",BangHl04X,BangHl04Y);} if(Bang.name == "Bang05"){this.Bang_Hl_fnc("bang_hl05_0017","BangHl05",BangHl05X,BangHl05Y);} if(Bang.name == "Bang06"){this.Bang_Hl_fnc("bang_hl06_0017","BangHl06",BangHl06X,BangHl06Y);} } } }, LipsShuffle_fnc: function() { /* ***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: var LipsRand = Math.floor(Math.random()*(6-1+1))+1; if(lipsColor == 6) { if(LipsRand == 6){this.Lips_fnc("lips06_0001","Lips06",Lips06X,Lips06Y,true,"teeth01");} . . . } */ var LipsRand = Math.floor(Math.random()*(5-1+1))+1; if(lipsColor == 1) { /* ***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(LipsRand == 6){this.Lips_fnc("lips06_0001","Lips06",Lips06X,Lips06Y,true,"teeth01"); or if doesn't have a teeth if(LipsRand == 6){this.Lips_fnc("lips06_0001","Lips06",Lips06X,Lips06Y,false,null);} */ if(LipsRand == 1){this.Lips_fnc("lips01_0001","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0001","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0001","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0001","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0001","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 2) { if(LipsRand == 1){this.Lips_fnc("lips01_0002","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0002","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0002","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0002","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0002","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 3) { if(LipsRand == 1){this.Lips_fnc("lips01_0003","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0003","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0003","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0003","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0003","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 4) { if(LipsRand == 1){this.Lips_fnc("lips01_0004","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0004","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0004","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0004","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0004","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 5) { if(LipsRand == 1){this.Lips_fnc("lips01_0005","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0005","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0005","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0005","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0005","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 0 || lipsColor == 6) { if(LipsRand == 1){this.Lips_fnc("lips01_0006","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0006","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0006","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0006","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0006","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 7) { if(LipsRand == 1){this.Lips_fnc("lips01_0007","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0007","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0007","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0007","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0007","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 8) { if(LipsRand == 1){this.Lips_fnc("lips01_0008","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0008","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0008","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0008","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0008","Lips05",Lips05X,Lips05Y,false,null);} } if(lipsColor == 9) { if(LipsRand == 1){this.Lips_fnc("lips01_0009","Lips01",Lips01X,Lips01Y,true,"teeth01");} if(LipsRand == 2){this.Lips_fnc("lips02_0009","Lips02",Lips02X,Lips02Y,true,"teeth02");} if(LipsRand == 3){this.Lips_fnc("lips03_0009","Lips03",Lips03X,Lips03Y,true,"teeth03");} if(LipsRand == 4){this.Lips_fnc("lips04_0009","Lips04",Lips04X,Lips04Y,false,null);} if(LipsRand == 5){this.Lips_fnc("lips05_0009","Lips05",Lips05X,Lips05Y,false,null);} } }, ShoesShuffle_fnc: function() { /* ***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: var ShoesRand = Math.floor(Math.random()*(31-1+1))+1; if(ShoesRand == 31){this.AddShoes_fnc("shoes0031","Shoes31",ShoesX,ShoesY);} */ var ShoesRand = Math.floor(Math.random()*(30-1+1))+1; if(ShoesRand == 1){this.AddShoes_fnc("shoes0001","Shoes01",ShoesX,ShoesY);} if(ShoesRand == 2){this.AddShoes_fnc("shoes0002","Shoes02",ShoesX,ShoesY);} if(ShoesRand == 3){this.AddShoes_fnc("shoes0003","Shoes03",ShoesX,ShoesY);} if(ShoesRand == 4){this.AddShoes_fnc("shoes0004","Shoes04",ShoesX,ShoesY);} if(ShoesRand == 5){this.AddShoes_fnc("shoes0005","Shoes05",ShoesX,ShoesY);} if(ShoesRand == 6){this.AddShoes_fnc("shoes0006","Shoes06",ShoesX,ShoesY);} if(ShoesRand == 7){this.AddShoes_fnc("shoes0007","Shoes07",ShoesX,ShoesY);} if(ShoesRand == 8){this.AddShoes_fnc("shoes0008","Shoes08",ShoesX,ShoesY);} if(ShoesRand == 9){this.AddShoes_fnc("shoes0009","Shoes09",ShoesX,ShoesY);} if(ShoesRand == 10){this.AddShoes_fnc("shoes0010","Shoes10",ShoesX,ShoesY);} if(ShoesRand == 11){this.AddShoes_fnc("shoes0011","Shoes11",ShoesX,ShoesY);} if(ShoesRand == 12){this.AddShoes_fnc("shoes0012","Shoes12",ShoesX,ShoesY);} if(ShoesRand == 13){this.AddShoes_fnc("shoes0013","Shoes13",ShoesX,ShoesY);} if(ShoesRand == 14){this.AddShoes_fnc("shoes0014","Shoes14",ShoesX,ShoesY);} if(ShoesRand == 15){this.AddShoes_fnc("shoes0015","Shoes15",ShoesX,ShoesY);} if(ShoesRand == 16){this.AddShoes_fnc("shoes0016","Shoes16",ShoesX,ShoesY);} if(ShoesRand == 17){this.AddShoes_fnc("shoes0017","Shoes17",ShoesX,ShoesY);} if(ShoesRand == 18){this.AddShoes_fnc("shoes0018","Shoes18",ShoesX,ShoesY);} if(ShoesRand == 19){this.AddShoes_fnc("shoes0019","Shoes19",ShoesX,ShoesY);} if(ShoesRand == 20){this.AddShoes_fnc("shoes0020","Shoes20",ShoesX,ShoesY);} if(ShoesRand == 21){this.AddShoes_fnc("shoes0021","Shoes21",ShoesX,ShoesY);} if(ShoesRand == 22){this.AddShoes_fnc("shoes0022","Shoes22",ShoesX,ShoesY);} if(ShoesRand == 23){this.AddShoes_fnc("shoes0023","Shoes23",ShoesX,ShoesY);} if(ShoesRand == 24){this.AddShoes_fnc("shoes0024","Shoes24",ShoesX,ShoesY);} if(ShoesRand == 25){this.AddShoes_fnc("shoes0025","Shoes25",ShoesX,ShoesY);} if(ShoesRand == 26){this.AddShoes_fnc("shoes0026","Shoes26",ShoesX,ShoesY);} if(ShoesRand == 27){this.AddShoes_fnc("shoes0027","Shoes27",ShoesX,ShoesY);} if(ShoesRand == 28){this.AddShoes_fnc("shoes0028","Shoes28",ShoesX,ShoesY);} if(ShoesRand == 29){this.AddShoes_fnc("shoes0029","Shoes29",ShoesX,ShoesY);} if(ShoesRand == 30){this.AddShoes_fnc("shoes0030","Shoes30",ShoesX,ShoesY);} }, AddShoes_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.x = ShoesX; Shoes.y = ShoesY; Shoes.name = ShoesName; this.SortMainGroup_fnc(); }, BottomsShuffle_fnc: function() { /* ***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: var BottomsRand = Math.floor(Math.random()*(31-1+1))+1; if(BottomsRand == 31){this.AddBottoms_fnc("bottoms0031","Bottoms31",BottomsX,BottomsY);} */ var BottomsRand = Math.floor(Math.random()*(30-1+1))+1; if(BottomsRand == 1){this.AddBottoms_fnc("bottoms0001","Bottoms01",BottomsX,BottomsY);} if(BottomsRand == 2){this.AddBottoms_fnc("bottoms0002","Bottoms02",BottomsX,BottomsY);} if(BottomsRand == 3){this.AddBottoms_fnc("bottoms0003","Bottoms03",BottomsX,BottomsY);} if(BottomsRand == 4){this.AddBottoms_fnc("bottoms0004","Bottoms04",BottomsX,BottomsY);} if(BottomsRand == 5){this.AddBottoms_fnc("bottoms0005","Bottoms05",BottomsX,BottomsY);} if(BottomsRand == 6){this.AddBottoms_fnc("bottoms0006","Bottoms06",BottomsX,BottomsY);} if(BottomsRand == 7){this.AddBottoms_fnc("bottoms0007","Bottoms07",BottomsX,BottomsY);} if(BottomsRand == 8){this.AddBottoms_fnc("bottoms0008","Bottoms08",BottomsX,BottomsY);} if(BottomsRand == 9){this.AddBottoms_fnc("bottoms0009","Bottoms09",BottomsX,BottomsY);} if(BottomsRand == 10){this.AddBottoms_fnc("bottoms0010","Bottoms10",BottomsX,BottomsY);} if(BottomsRand == 11){this.AddBottoms_fnc("bottoms0011","Bottoms11",BottomsX,BottomsY);} if(BottomsRand == 12){this.AddBottoms_fnc("bottoms0012","Bottoms12",BottomsX,BottomsY);} if(BottomsRand == 13){this.AddBottoms_fnc("bottoms0013","Bottoms13",BottomsX,BottomsY);} if(BottomsRand == 14){this.AddBottoms_fnc("bottoms0014","Bottoms14",BottomsX,BottomsY);} if(BottomsRand == 15){this.AddBottoms_fnc("bottoms0015","Bottoms15",BottomsX,BottomsY);} if(BottomsRand == 16){this.AddBottoms_fnc("bottoms0016","Bottoms16",BottomsX,BottomsY);} if(BottomsRand == 17){this.AddBottoms_fnc("bottoms0017","Bottoms17",BottomsX,BottomsY);} if(BottomsRand == 18){this.AddBottoms_fnc("bottoms0018","Bottoms18",BottomsX,BottomsY);} if(BottomsRand == 19){this.AddBottoms_fnc("bottoms0019","Bottoms19",BottomsX,BottomsY);} if(BottomsRand == 20){this.AddBottoms_fnc("bottoms0020","Bottoms20",BottomsX,BottomsY);} if(BottomsRand == 21){this.AddBottoms_fnc("bottoms0021","Bottoms21",BottomsX,BottomsY);} if(BottomsRand == 22){this.AddBottoms_fnc("bottoms0022","Bottoms22",BottomsX,BottomsY);} if(BottomsRand == 23){this.AddBottoms_fnc("bottoms0023","Bottoms23",BottomsX,BottomsY);} if(BottomsRand == 24){this.AddBottoms_fnc("bottoms0024","Bottoms24",BottomsX,BottomsY);} if(BottomsRand == 25){this.AddBottoms_fnc("bottoms0025","Bottoms25",BottomsX,BottomsY);} if(BottomsRand == 26){this.AddBottoms_fnc("bottoms0026","Bottoms26",BottomsX,BottomsY);} if(BottomsRand == 27){this.AddBottoms_fnc("bottoms0027","Bottoms27",BottomsX,BottomsY);} if(BottomsRand == 28){this.AddBottoms_fnc("bottoms0028","Bottoms28",BottomsX,BottomsY);} if(BottomsRand == 29){this.AddBottoms_fnc("bottoms0029","Bottoms29",BottomsX,BottomsY);} if(BottomsRand == 30){this.AddBottoms_fnc("bottoms0030","Bottoms30",BottomsX,BottomsY);} }, AddBottoms_fnc: function(BottomsKey,BottomsName,BottomsX,BottomsY) { if(!dressOn) { Bottoms.destroy(); Bottoms = this.add.button(0,0,BottomsKey,function() { Bottoms.visible = false; Panty.visible = true; },this); Bottoms.anchor.setTo(0.5,0.5); Bottoms.x = BottomsX; Bottoms.y = BottomsY; Bottoms.name = BottomsName; this.SortMainGroup_fnc(); } else { Bottoms.visible = false; } }, SocksShuffle_fnc: function() { /* ***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: var SocksRand = Math.floor(Math.random()*(21-1+1))+1; if(SocksRand == 21){this.AddSocks_fnc("socks0021","Socks21",SocksX,SocksY);} */ var SocksRand = Math.floor(Math.random()*(20-1+1))+1; if(SocksRand == 1){this.AddSocks_fnc("socks0001","Socks01",SocksX,SocksY);} if(SocksRand == 2){this.AddSocks_fnc("socks0002","Socks02",SocksX,SocksY);} if(SocksRand == 3){this.AddSocks_fnc("socks0003","Socks03",SocksX,SocksY);} if(SocksRand == 4){this.AddSocks_fnc("socks0004","Socks04",SocksX,SocksY);} if(SocksRand == 5){this.AddSocks_fnc("socks0005","Socks05",SocksX,SocksY);} if(SocksRand == 6){this.AddSocks_fnc("socks0006","Socks06",SocksX,SocksY);} if(SocksRand == 7){this.AddSocks_fnc("socks0007","Socks07",SocksX,SocksY);} if(SocksRand == 8){this.AddSocks_fnc("socks0008","Socks08",SocksX,SocksY);} if(SocksRand == 9){this.AddSocks_fnc("socks0009","Socks09",SocksX,SocksY);} if(SocksRand == 10){this.AddSocks_fnc("socks0010","Socks10",SocksX,SocksY);} if(SocksRand == 11){this.AddSocks_fnc("socks0011","Socks11",SocksX,SocksY);} if(SocksRand == 12){this.AddSocks_fnc("socks0012","Socks12",SocksX,SocksY);} if(SocksRand == 13){this.AddSocks_fnc("socks0013","Socks13",SocksX,SocksY);} if(SocksRand == 14){this.AddSocks_fnc("socks0014","Socks14",SocksX,SocksY);} if(SocksRand == 15){this.AddSocks_fnc("socks0015","Socks15",SocksX,SocksY);} if(SocksRand == 16){this.AddSocks_fnc("socks0016","Socks16",SocksX,SocksY);} if(SocksRand == 17){this.AddSocks_fnc("socks0017","Socks17",SocksX,SocksY);} if(SocksRand == 18){this.AddSocks_fnc("socks0018","Socks18",SocksX,SocksY);} if(SocksRand == 19){this.AddSocks_fnc("socks0019","Socks19",SocksX,SocksY);} if(SocksRand == 20){this.AddSocks_fnc("socks0020","Socks20",SocksX,SocksY);} }, AddSocks_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.x = SocksX; Socks.y = SocksY; Socks.name = SocksName; this.SortMainGroup_fnc(); }, ExtrasShuffle_fnc: function() { /* ***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: var ExtrasRand = Math.floor(Math.random()*(7-1+1))+1; if(ExtrasRand == 7){this.AddExtras_fnc("extras07","Extra07",ExtrasX,ExtrasY);} */ var ExtrasRand = Math.floor(Math.random()*(6-1+1))+1; if(ExtrasRand == 1){this.AddExtras_fnc("extras01","Extra01",ExtrasX,ExtrasY);} if(ExtrasRand == 2){this.AddExtras_fnc("extras02","Extra02",ExtrasX,ExtrasY);} if(ExtrasRand == 3){this.AddExtras_fnc("extras03","Extra03",ExtrasX,ExtrasY);} if(ExtrasRand == 4){this.AddExtras_fnc("extras04","Extra04",ExtrasX,ExtrasY);} if(ExtrasRand == 5){this.AddExtras_fnc("extras05","Extra05",ExtrasX,ExtrasY);} if(ExtrasRand == 6){this.AddExtras_fnc("extras06","Extra06",ExtrasX,ExtrasY);} }, AddExtras_fnc: function(ExtrasKey,ExtrasName,ExtrasX,ExtrasY) { Extras.destroy(); Extras = this.add.button(0,0,ExtrasKey,function() { Extras.visible = false; },this); Extras.anchor.setTo(0.5,0.5); Extras.x = ExtrasX; Extras.y = ExtrasY; Extras.name = ExtrasName; this.SortMainGroup_fnc(); }, update: function() { }, /*I created this debugger so you can easily drag and drop any images that you wanted to get the x and y. To use this, simply add this.debug_fnc(<Image>); in the create function. Note: if you are going to use this on a button or an image/sprite that is clickable, please disable/comment out the button's function first so that it will not interfere with this debugger. And if you are going to sell, distribute or publish this game, please delete this debugger and PosText to avoid errors in the game. Thank you! :) */ debug_fnc: function(Obj) { // ©Francis Paul Perez Obj.inputEnabled = true; Obj.input.enableDrag(false); Obj.events.onInputUp.add(function() { /*console.log("X = "+Obj.x); console.log("Y = "+Obj.y);*/ PosText.text = "X: " + Obj.x + "\n" + "Y: " + Obj.y; },this); }, }