public/js-roguelike-skeleton/src/valid-targets.js
function(autoset){
            autoset =  autoset !== void 0 ? autoset : true;
            if(autoset && !this.current && this.targets.length){
                this.sort();
                this.setCurrent(this.targets[0]);
            }

            return this.current;
        }
function(autoset){
            autoset =  autoset !== void 0 ? autoset : true;
            if(autoset && !this.current && this.targets.length){
                this.sort();
                this.setCurrent(this.targets[0]);
            }

            return this.current;
        }
function ( autoset ) { autoset = autoset !== void 0 ? autoset : true ; if ( autoset && ! this . current && this . targets . length ) { this . sort ( ) ; this . setCurrent ( this . targets [ 0 ] ) ; } return this . current ; }
Gets the currently selected target object.
@method getCurrent
@param {Bool} [autoset=true] - If no target is set to current autoset the first.
@return {Object}
Gets the currently selected target object .