mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
20 lines
No EOL
415 B
JavaScript
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 + '" />';
|
|
}
|
|
};
|
|
} |