src/spatial/collision.js
function(component, collisionData) {
        return function() {
            var hitData = this.hit(component);

            if (collisionData.occurring === true) {
                if (hitData !== null) {
                    // The collision is still in progress
                    return;
                }

                collisionData.occurring = false;
                this.trigger("HitOff", component);
            } else if (hitData !== null) {
                collisionData.occurring = true;
                this.trigger("HitOn", hitData);
            }
        };
    }
function(component, collisionData) {
        return function() {
            var hitData = this.hit(component);

            if (collisionData.occurring === true) {
                if (hitData !== null) {
                    // The collision is still in progress
                    return;
                }

                collisionData.occurring = false;
                this.trigger("HitOff", component);
            } else if (hitData !== null) {
                collisionData.occurring = true;
                this.trigger("HitOn", hitData);
            }
        };
    }
function ( component , collisionData ) { return function ( ) { var hitData = this . hit ( component ) ; if ( collisionData . occurring === true ) { if ( hitData !== null ) { // The collision is still in progress return ; } collisionData . occurring = false ; this . trigger ( "HitOff" , component ) ; } else if ( hitData !== null ) { collisionData . occurring = true ; this . trigger ( "HitOn" , hitData ) ; } } ; }
This is a helper method for creating collisions handlers set up by `checkHits`. Do not call this directly.

@param {String} component - The name of the component for which this handler checks for collisions.
@param {Object} collisionData - Collision data object used to track collisions with the specified component.

@see .checkHits
This is a helper method for creating collisions handlers set up by checkHits . Do not call this directly .