(function () {
    var mirrorID, reflectionAreaID;
    // get id of reflection area and mirror
    this.preload = function(entityID) {
        reflectionAreaID = entityID;
        mirrorID = Entities.getEntityProperties(reflectionAreaID, 'parentID').parentID;
    };

    // when avatar enters reflection area, begin reflecting
    this.enterEntity = function(entityID){
        Entities.callEntityMethod(mirrorID, 'mirrorLocalEntityOn');
    };

    // when avatar leaves reflection area, stop reflecting
    this.leaveEntity = function (entityID) {
        Entities.callEntityMethod(mirrorID, 'mirrorLocalEntityOff');
    };
});
