// RotDirectionalSprite Class
// RotDirectionalSprite.java

// Imports
import java.awt.*;
import java.util.Random;

public class RotDirectionalSprite extends DirectionalSprite {

  public RotDirectionalSprite(Component comp, Image[] img, Point pos,
    Point vel, int z, int ba, int d) {
    super( comp,  img,  pos, vel,  z,  ba,  d);
  }

//  public RotDirectionalSprite(Component comp, Image[] img, Point pos,
//    Point vel, int z, int ba, int d) 
//    {
//    super(comp, img, 0, 1, 2, pos, new Point(1, 1), 50,
//      Sprite.BA_WRAP, 0);
//  }

	public RotDirectionalSprite(Component comp, Image[][] img, int f,
    	int fi, int fd, Point pos, Point vel, int z, int ba, int d) 
	{
		super(comp, img, f, fi, fd, pos, vel, z, ba, d);
	}
/*  public RotDirectionalSprite(Component comp, Image[] img, Point pos,
    Point vel, int z, int ba, int d) {
    super(comp, img[d], pos, vel, z, ba, d);
  }

	public RotDirectionalSprite(Component comp, Image[][] img, int f,
    	int fi, int fd, Point pos, Point vel, int z, int ba, int d) 
	{
		super(comp, img[d], f, fi, fd, pos, vel, z, ba, d);
	}
*/
	public void setDirection(int dir) 
	{
		// Set the direction
		 dir = Math.abs(dir)%7;
		direction = dir;

		// Change the velocity
		velocity.x *= velDirs[dir][0];
		velocity.y *= velDirs[dir][1];

		// Set the image
		setImage(image[dir]);
	}

}
