function createClothing(spriteString,clothingType,scene){
            var clothing = scene.matter.add.sprite(600,300,spriteString);
            utilities.scaletoIconSize(clothing);
            clothing.setInteractive();
            clothing.setSensor(true);
            clothing.on('pointerdown', () => utilities.playSoundEffect(clothingPickup1));
            clothing.clothingType = clothingType;
            clothing.ignoreDestroy=true;
            switch (clothingType){
                case clothingTypes.hat:
                    hatGroup.add(clothing);
                    break;
                case clothingTypes.shoe:
                    shoeGroup.add(clothing);
                    break;
                case clothingTypes.shirt:
                    shirtGroup.add(clothing);
                    break;   
                case clothingTypes.pants:
                    pantsGroup.add(clothing);
                    break;                                                 
            }
            return clothing;

        }
//add a single piece of clothing to the scene.
add a single piece of clothing to the scene.
add a single piece of clothing to the scene .
function createClothing(spriteString,clothingType,scene){
            var clothing = scene.matter.add.sprite(600,300,spriteString);
            utilities.scaletoIconSize(clothing);
            clothing.setInteractive();
            clothing.setSensor(true);
            clothing.on('pointerdown', () => utilities.playSoundEffect(clothingPickup1));
            clothing.clothingType = clothingType;
            clothing.ignoreDestroy=true;
            switch (clothingType){
                case clothingTypes.hat:
                    hatGroup.add(clothing);
                    break;
                case clothingTypes.shoe:
                    shoeGroup.add(clothing);
                    break;
                case clothingTypes.shirt:
                    shirtGroup.add(clothing);
                    break;   
                case clothingTypes.pants:
                    pantsGroup.add(clothing);
                    break;                                                 
            }
            return clothing;
        }
function createClothing ( spriteString , clothingType , scene ) { var clothing = scene . matter . add . sprite ( 600 , 300 , spriteString ) ; utilities . scaletoIconSize ( clothing ) ; clothing . setInteractive ( ) ; clothing . setSensor ( true ) ; clothing . on ( 'pointerdown' , ( ) => utilities . playSoundEffect ( clothingPickup1 ) ) ; clothing . clothingType = clothingType ; clothing . ignoreDestroy = true ; switch ( clothingType ) { case clothingTypes . hat : hatGroup . add ( clothing ) ; break ; case clothingTypes . shoe : shoeGroup . add ( clothing ) ; break ; case clothingTypes . shirt : shirtGroup . add ( clothing ) ; break ; case clothingTypes . pants : pantsGroup . add ( clothing ) ; break ; } return clothing ; }
add a single piece of clothing to the scene.
add a single piece of clothing to the scene .