chuck.js/editor/script/Tile.js
2012-06-13 17:32:31 +02:00

20 lines
No EOL
415 B
JavaScript

// Tile Class
function Tile(x, y, tile, rotation)
{
this.x = x;
this.y = y;
this.tile = tile;
this.rotation = rotation;
this.toString = function()
{
if(this.rotation == 0)
{
return '<tile shape="' + this.tile + '" x="' + this.x + '" y="' + this.y + '" />';
}
else
{
return '<tile shape="' + this.tile + '" x="' + this.x + '" y="' + this.y + '" rotation="' + this.rotation + '" />';
}
};
}