package enemies 
{
	import engine.Utils;
	/**
	 * ...
	 * @author Fiodar Paulavets
	 */
	public class EnemyTiny extends Enemy 
	{
		
		public function EnemyTiny() 
		{
			super(TinyPepelazClip, 62);
			
			var direction: uint = Math.round(Math.random()); // 0: ->, 1: <-
			x = Game.screenWidth * direction + _clip.width / 2 * (direction * 2 - 1);
			x += Math.random() * 50 * (direction * 2 - 1);
			
			var updown: uint = Math.round(Math.random()); // 0: вверху, 1: внизу
			y = (Game.screenHeight - 100) * updown;
			y += Math.random() * 50 * (updown * 2 - 1);
			
			_velocity.x = (1 - direction * 2) * Game.screenWidth / (Game.screenHeight - 100);
			_velocity.y = (1 - updown * 2);
			_speed = 125;
			
			if (direction)
				rotation = -20;
			else
				rotation = 20;
			
			life = 1;
			radius = 30;
		}
		
	}

}