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

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

Deco_GrowIvy.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,
				0,
				this.x,
				this._heap.drawpoint - this._heap.i*this.tile_sheet.tile_pixel_height
				);
		}
	};
