"use strict";
/* ivy hanging length blocks downward */
var Deco_HangIvy = function(length){
	this.length = length ? length : 4;
}

Deco_HangIvy.prototype = new Decoration(
	new TileSheet(
		4, 4, 0, 2, 
		SDS_Load_Image("art/sheets/decoration/ivy.png")
	),
	"HangIvy");

Deco_HangIvy.prototype.drawIntoCanvas = function(canvas){
		if (this.tile_sheet){
			this._heap.drawpoint = this.y;
			for (this._heap.i=0; this._heap.i<this.length-1; this._heap.i++){
				this.tile_sheet.drawIntoCanvas(
					canvas,
					1,
					this.x,
					this._heap.drawpoint + this._heap.i*this.tile_sheet.tile_pixel_height
					);
			}
			this.tile_sheet.drawIntoCanvas(
				canvas,
				2,
				this.x,
				this._heap.drawpoint + this._heap.i*this.tile_sheet.tile_pixel_height
				);
		}
	};
