package game.GameMain.Mobs
{
	import flash.display.Bitmap;
	import flash.geom.Point;
	import flinjin.motion.Motion;
	import flinjin.motion.MotionChain;
	import flinjin.types.BoundingRect;
	
	/**
	 * ...
	 * @author Michael Miriti <m.s.miriti@gmail.com>
	 */
	public class MasquitoMob extends Mob
	{
		//[Embed(source="../../../assets/masquito.png")]
		private static var _masquitoBmp:Class;
		
		private var _checkPoints:Vector.<Point>;
		private var _currentPoint:int = 0;
		
		public function setTrCenter(nX:Number, nY:Number):void
		{
			_checkPoints = new Vector.<Point>;
			_checkPoints.push(new Point(nX - 200, nY - 60));
			_checkPoints.push(new Point(nX + 200, nY - 20));
			_checkPoints.push(new Point(nX - 180, nY + 60));
			_checkPoints.push(new Point(nX + 200, nY + 30));
			
			motion = new MotionChain([new Motion(_checkPoints[0], _checkPoints[1], 30), new Motion(_checkPoints[1], _checkPoints[2], 30), new Motion(_checkPoints[2], _checkPoints[3], 30), new Motion(_checkPoints[3], _checkPoints[0], 30)]);
			(motion as MotionChain).loop = true;
		}
		
		public function MasquitoMob()
		{
			super(new _masquitoBmp() as Bitmap, new Point(25, 25), true, 50, 50, 1);
			setBoundingShape(new BoundingRect(this, 25, 25));
		}
	
	}

}