public/js-roguelike-skeleton/src/game.js
function(x, y){
            var coords = this.renderer.mouseToTileCoords(x, y),
                tile = this.map.get(coords.x, coords.y);
            if(!tile){
                return;
            }
            var entityTile = this.entityManager.get(tile.x, tile.y);
            if(entityTile){
                this.console.log('Looks like a <strong>' + entityTile.name + '</strong> standing on a <strong>' + tile.name + '</strong> to me.');
            }
            else{
                this.console.log('Looks like a <strong>' + tile.name + '</strong> to me.');
            }
        }
function(x, y){
            var coords = this.renderer.mouseToTileCoords(x, y),
                tile = this.map.get(coords.x, coords.y);
            if(!tile){
                return;
            }
            var entityTile = this.entityManager.get(tile.x, tile.y);
            if(entityTile){
                this.console.log('Looks like a <strong>' + entityTile.name + '</strong> standing on a <strong>' + tile.name + '</strong> to me.');
            }
            else{
                this.console.log('Looks like a <strong>' + tile.name + '</strong> to me.');
            }
        }
function ( x , y ) { var coords = this . renderer . mouseToTileCoords ( x , y ) , tile = this . map . get ( coords . x , coords . y ) ; if ( ! tile ) { return ; } var entityTile = this . entityManager . get ( tile . x , tile . y ) ; if ( entityTile ) { this . console . log ( 'Looks like a <strong>' + entityTile . name + '</strong> standing on a <strong>' + tile . name + '</strong> to me.' ) ; } else { this . console . log ( 'Looks like a <strong>' + tile . name + '</strong> to me.' ) ; } }
Handles tile mouse click events.
@method onClick
@param {Number} x - Mouse x coord relative to window.
@param {Number} y - Mouse y coord relative to window.
Handles tile mouse click events .