public/js-roguelike-skeleton/src/valid-targets.js
function(obj){
            for(var i = this.typeSortPriority.length - 1; i >= 0; i--){
                var type = this.typeSortPriority[i];
                if(obj instanceof type){
                    return i;
                }
            }
        }
function(obj){
            for(var i = this.typeSortPriority.length - 1; i >= 0; i--){
                var type = this.typeSortPriority[i];
                if(obj instanceof type){
                    return i;
                }
            }
        }
function ( obj ) { for ( var i = this . typeSortPriority . length - 1 ; i >= 0 ; i -- ) { var type = this . typeSortPriority [ i ] ; if ( obj instanceof type ) { return i ; } } }
Gets the sort priority of an object based on its type using 'this.typeSortPriority'.
@method getTypeSortPriority
@param {Object} obj
@return {Number}
Gets the sort priority of an object based on its type using this . typeSortPriority .