public/js-roguelike-skeleton/manual/index/entity/js/basic-movement.js
function(x, y) {
            // remove light from current position
            if(this.game.lighting.get(this.x, this.y)){
                this.game.lighting.remove(this.x, this.y);
            }
            // add to new position
            this.game.lighting.set(x, y, this.light_r, this.light_g, this.light_b);

            RL.Entity.prototype.moveTo.call(this, x, y);
        }
function(x, y) {
            // remove light from current position
            if(this.game.lighting.get(this.x, this.y)){
                this.game.lighting.remove(this.x, this.y);
            }
            // add to new position
            this.game.lighting.set(x, y, this.light_r, this.light_g, this.light_b);

            RL.Entity.prototype.moveTo.call(this, x, y);
        }
function ( x , y ) { // remove light from current position if ( this . game . lighting . get ( this . x , this . y ) ) { this . game . lighting . remove ( this . x , this . y ) ; } // add to new position this . game . lighting . set ( x , y , this . light_r , this . light_g , this . light_b ) ; RL . Entity . prototype . moveTo . call ( this , x , y ) ; }
Changes the position of this entity on the map.
@method moveTo
@param {Number} x - The tile map x coord to move to.
@param {Number} y - The tile map y coord to move to.
Changes the position of this entity on the map .