public/js-roguelike-skeleton/src/tile.js
function Tile(game, type, x, y) {
        this.game = game;
        this.x = x;
        this.y = y;
        this.type = type;

        var typeData = Tile.Types[type];
        RL.Util.merge(this, typeData);

        this.id = tileId++;

        if(this.init){
            this.init(game, type, x, y);
        }
    }
function Tile(game, type, x, y) {
        this.game = game;
        this.x = x;
        this.y = y;
        this.type = type;

        var typeData = Tile.Types[type];
        RL.Util.merge(this, typeData);

        this.id = tileId++;

        if(this.init){
            this.init(game, type, x, y);
        }
    }
function Tile ( game , type , x , y ) { this . game = game ; this . x = x ; this . y = y ; this . type = type ; var typeData = Tile . Types [ type ] ; RL . Util . merge ( this , typeData ) ; this . id = tileId ++ ; if ( this . init ) { this . init ( game , type , x , y ) ; } }
Represents a tile in the game map.
@class Tile
@constructor
@uses TileDraw
@param {Object} game - Game instance this obj is attached to.
@param {String} type - Type of tile. When created this object is merged with the value of Tile.Types[type].
@param {Number} x - The map tile coordinate position of this tile on the x axis.
@param {Number} y - The map tile coordinate position of this tile on the y axis.
Represents a tile in the game map .