This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Checks if the specified object is colliding with tiles in the map in an area defined by the object's colw and colh variables as well as the tolerance and approximation variables that are passed in through data. Only tiles in the map marked as solid are checked against. The alogrithm checks the | |
* @param {Object} th The object that is being checked against the tilemap. | |
* @param {Object} map This is the asci map that the tile map is generated from. | |
* @param {Object} tilemap This is the array of tile objects that it itterated over checking for collisions. | |
* @param {Object} defaulttile The default tile to be returned if nothing can be found. Null can be used here. | |
* @param {Object} data Passes is extra dat to the function. Can be set as null. | |
* <ul> | |
* <li>tolerance{Integer}: This is subtracted from the collision space to get the maximum collision area for the object. This defaults to 6.</li> | |
* <li>approximation{Integer}: This is the amount that the checked values are incremented by until they reach the maxim |