"use strict";
/* 4px tall 45-degree steps downwards from specified tile (16x4 segments) */
var Deco_WoodStairs = function(length, direction){
	this.length = length ? length : 4;
	this.direction = direction ? direction : 1;
	this.step = this.tile_sheet.tile_pixel_height;//(this.tile_sheet.tile_pixel_height>>1);
}

Deco_WoodStairs.prototype = new Decoration(
	new TileSheet(
		4, 2, 0, 1, 
		SDS_Load_Image("art/sheets/decoration/woodstairs.png")
	),
	"WoodStairs");

Deco_WoodStairs.prototype.drawIntoCanvas = function(canvas){
		if (this.tile_sheet){
			for (this._heap.i=0; this._heap.i<this.length; ++this._heap.i){
				this.tile_sheet.drawIntoCanvas(
					canvas,
					this.direction>0 ? 0 : 1,
					this.x + this.direction * this._heap.i * this.step,
					this.y + this._heap.i * this.step
					);
			}
		}
	};
