public/js-roguelike-skeleton/src/valid-targets.js
function(targets){
            targets = targets || [];
            this.targets = targets;
            this.map.reset();
            for(var i = targets.length - 1; i >= 0; i--){
                var target = targets[i];
                this.map.add(target.x, target.y, target);
            }
        }
function(targets){
            targets = targets || [];
            this.targets = targets;
            this.map.reset();
            for(var i = targets.length - 1; i >= 0; i--){
                var target = targets[i];
                this.map.add(target.x, target.y, target);
            }
        }
function ( targets ) { targets = targets || [ ] ; this . targets = targets ; this . map . reset ( ) ; for ( var i = targets . length - 1 ; i >= 0 ; i -- ) { var target = targets [ i ] ; this . map . add ( target . x , target . y , target ) ; } }
Sets the targets, replacing currently set ones.
@method setTargets
@param {Array} targets
Sets the targets replacing currently set ones .