function assignSpriteData(objectLayer,type){
            objectLayer.each(function(gameObject) {
                gameObject.setData('origin', gameObject.getCenter());
                gameObject.setData('type', type);
                gameObject.setData('group', objectLayer);
                gameObject.setData('index', objectLayer.getIndex(gameObject));
                //console.log(gameObject.scene.scene.key);
                gameObject.on('pointerover', function () {
                    if(gameObject.scene.scene.key=="DressUpScene"){
                        //Inner highlight shader
                        postFxPlugin.add(gameObject, {
                            thickness: 3,
                            outlineColor: 0xffb4db
                        });

                        //Outer highlight shader
                        postFxPlugin.add(gameObject, {
                            thickness: 5,
                            outlineColor: 0x4e1a69
                        });
                    }
                })
                gameObject.on('pointerout', function () {
                    if(gameObject.scene.scene.key=="DressUpScene"){
                        postFxPlugin.remove(gameObject);
                        
                    }
                })
            });
    
        }
//Needed for snapping back/un-equipping
Needed for snapping back/un-equipping
Needed for snapping back / un - equipping
function assignSpriteData(objectLayer,type){
            objectLayer.each(function(gameObject) {
                gameObject.setData('origin', gameObject.getCenter());
                gameObject.setData('type', type);
                gameObject.setData('group', objectLayer);
                gameObject.setData('index', objectLayer.getIndex(gameObject));
                gameObject.on('pointerover', function () {
                    if(gameObject.scene.scene.key=="DressUpScene"){
                        postFxPlugin.add(gameObject, {
                            thickness: 3,
                            outlineColor: 0xffb4db
                        });
                        postFxPlugin.add(gameObject, {
                            thickness: 5,
                            outlineColor: 0x4e1a69
                        });
                    }
                })
                gameObject.on('pointerout', function () {
                    if(gameObject.scene.scene.key=="DressUpScene"){
                        postFxPlugin.remove(gameObject);
                    }
                })
            });
        }
function assignSpriteData ( objectLayer , type ) { objectLayer . each ( function ( gameObject ) { gameObject . setData ( 'origin' , gameObject . getCenter ( ) ) ; gameObject . setData ( 'type' , type ) ; gameObject . setData ( 'group' , objectLayer ) ; gameObject . setData ( 'index' , objectLayer . getIndex ( gameObject ) ) ; gameObject . on ( 'pointerover' , function ( ) { if ( gameObject . scene . scene . key == "DressUpScene" ) { postFxPlugin . add ( gameObject , { thickness : 3 , outlineColor : 0xffb4db } ) ; postFxPlugin . add ( gameObject , { thickness : 5 , outlineColor : 0x4e1a69 } ) ; } } ) gameObject . on ( 'pointerout' , function ( ) { if ( gameObject . scene . scene . key == "DressUpScene" ) { postFxPlugin . remove ( gameObject ) ; } } ) } ) ; }
Needed for snapping back/un-equipping
Needed for snapping back / un - equipping
//console.log(gameObject.scene.scene.key); //Inner highlight shader //Outer highlight shader