package  
{
	import flash.display.Bitmap;
	import flash.display.Sprite;
	
	/**
	 * ...
	 * @author beisik
	 */
	public class Rock extends Sprite 
	{
		[Embed(source = 'textures/r1.png')] private const ROCK1: Class;
		[Embed(source = 'textures/r2.png')] private const ROCK2: Class;
		[Embed(source = 'textures/r3.png')] private const ROCK3: Class;
		[Embed(source = 'textures/w.png')] private const WOOD: Class;
		
		public var radius: Number;
		
		public var shadow: Shadow;
		
		public function Rock(x: Number, y: Number, image: uint) 
		{
			this.x = x;
			this.y = y;
			this.radius = radius;
			
			/*graphics.beginFill(0x999999, 0.8);
			graphics.drawCircle(0, 0, radius);
			graphics.endFill();*/
			
			switch (image)
			{
				case 0:
					var img: Bitmap = new ROCK1();
					radius = 48;
					break;
				case 1:
					img = new ROCK2();
					radius = 48;
					break;
				case 2:
					img = new ROCK3();
					radius = 48;
					break;
				case 3:
					img = new WOOD();
					radius = 48;
					break;
			}
			img.x = -50;
			img.y = -50;
			addChild(img);
			
			shadow = new Shadow(3);
			shadow.move(x, y);
			
			/*graphics.lineStyle(2, 0xFFFFFF);
			graphics.beginFill(0, 0.5);
			graphics.drawCircle(0, 0, radius);
			graphics.endFill();*/
		}
		
	}

}