package examples.dragNDrop;

import fang.*;
import java.awt.geom.*;

/**
 * Example for Draggable sprite.
 * @author Neal Ehardt
 */
public class DragNDrop extends GameLoop
{

	/** draggable sprite */
	private Draggable drag;

	/** Set up draggable. */
	public void startGame()
	{
		//link to the help file
		setHelp("resources/DragNDropHelp.txt");
		//generate new Draggable, shaped like a circle
		drag = new Draggable( new Ellipse2D.Double(0, 0, 1, 1) );
		//put in center of screen
		drag.setLocation(.5, .5);
		//make the shape take up half the screen
		drag.setScale(.2);
		//add the sprite to the canvas so it can be displayed
		canvas.addSprite(drag);
		//tell the sprite which mouse to use
		drag.setMouse( getPlayer().getMouse() );
	}

	/**
	 * @param args not used
	 */
	public static void main(String[] args)
	{
		DragNDrop dragNDrop = new DragNDrop();
		//only one player needed (not networked)
		dragNDrop.players = 1;

		dragNDrop.runAsApplication();
	}

}


