<commit_before>/*
 * MelonJS Game Engine
 * Copyright (C) 2011 - 2014 <NAME>, <NAME>, <NAME>
 * http://www.melonjs.org
 *
 */

(function () {

    /**
     * a Generic Body Object <br>
     * @class
     * @extends me.Rect
     * @memberOf me
     * @constructor
     * @param {me.Entity} entity the parent entity
     */
    me.Body = me.Rect.extend(
    /** @scope me.Body.prototype */
    {
        /** @ignore */
        init : function (entity) {
          
            // reference to the parent entity
            this.entity = entity;

            /**
             * Offset of the Body from the Entity position
             * @ignore
             * @type me.Vector2d
             * @name offset
             * @memberOf me.Body
             */
            this.offset = new me.Vector2d();

            /**
             * The collision shapes of the entity <br>
             * (note: only shape at index 0 is used in melonJS 1.0.x)
             * @type {me.Rect[]|me.PolyShape[]|me.Ellipse[]}
             * @name shapes
             * @memberOf me.Body
             */
            this.shapes = [];

            /**
             * The current shape index
             * @ignore
             * @type Number
             * @name shapeIndex
             * @memberOf me.Body
             */
            this.shapeIndex = 0;
            
            /**
             * onCollision callback<br>
             * called by the game manager when the object body collide with shtg<br>
             * @name onCollision
             * @memberOf me.Body
             * @function
             * @param {me.Vector2d} res collision vector
             * @param {me.Entity} obj the other entity object that hit this object
             * @protected
             */
            this.onCollision = undefined;
            
            
            /**
             * The body collision mask, that defines what should collide with what.<br>
             * (by default will collide with all entities)
             * @ignore
             * @type Number
             * @name collisionMask
             * @see me.collision.types
             * @memberOf me.Body
             */
            this.collisionMask = me.collision.types.ALL_OBJECT;
            
            /**
             * define the collision type of the body for collision filtering<br>
             * (set to `NO_OBJECT` to disable collision for this object).
             * @public
             * @type Number
             * @name collisionType
             * @see me.collision.types
             * @memberOf me.Body
             * @example
             * // set the entity body collision type
             * myEntity.body.setCollisionType = me.collision.types.PLAYER_OBJECT;
             */
            this.collisionType = me.collision.types.ENEMY_OBJECT;
<commit_msg>[documentation] fixed the `me.body.onCollision` parameter type and description<commit_after>/*
 * MelonJS Game Engine
 * Copyright (C) 2011 - 2014 <NAME>, <NAME>, <NAME>
 * http://www.melonjs.org
 *
 */

(function () {

    /**
     * a Generic Body Object <br>
     * @class
     * @extends me.Rect
     * @memberOf me
     * @constructor
     * @param {me.Entity} entity the parent entity
     */
    me.Body = me.Rect.extend(
    /** @scope me.Body.prototype */
    {
        /** @ignore */
        init : function (entity) {
          
            // reference to the parent entity
            this.entity = entity;

            /**
             * Offset of the Body from the Entity position
             * @ignore
             * @type me.Vector2d
             * @name offset
             * @memberOf me.Body
             */
            this.offset = new me.Vector2d();

            /**
             * The collision shapes of the entity <br>
             * (note: only shape at index 0 is used in melonJS 1.0.x)
             * @type {me.Rect[]|me.PolyShape[]|me.Ellipse[]}
             * @name shapes
             * @memberOf me.Body
             */
            this.shapes = [];

            /**
             * The current shape index
             * @ignore
             * @type Number
             * @name shapeIndex
             * @memberOf me.Body
             */
            this.shapeIndex = 0;
            
            /**
             * onCollision callback<br>
             * triggered in case of collision, when this entity body is being "touched" by another one<br>
             * @name onCollision
             * @memberOf me.Body
             * @function
             * @param {me.collision.ResponseObject} response the collision response object
             * @protected
             */
            this.onCollision = undefined;
            
            
            /**
             * The body collision mask, that defines what should collide with what.<br>
             * (by default will collide with all entities)
             * @ignore
             * @type Number
             * @name collisionMask
             * @see me.collision.types
             * @memberOf me.Body
             */
            this.collisionMask = me.collision.types.ALL_OBJECT;
            
            /**
             * define the collision type of the body for collision filtering<br>
             * (set to `NO_OBJECT` to disable collision for this object).
             * @public
             * @type Number
             * @name collisionType
             * @see me.collision.types
             * @memberOf me.Body
             * @example
             * // set the entity body collision type
             * myEntity.body.setCollisionType = me.collision.types.PLAYER_OBJECT;
             */
            this.collisionType = me.collision.types.ENEMY_OBJECT;

{'fraction_non_alphanumeric': 0.096723044397463, 'fraction_numerical': 0.0051092318534179, 'mean_word_length': 1.23503937007874, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4470076', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1441, 'n_words': 415}