import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class wheel here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class wheel extends Actor
{
boolean run=true;int time=100;
/**
* Act - do whatever the wheel wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
World world;
world=getWorld();
int locX = ((PlayerCar) getWorld().getObjects(PlayerCar.class).get(0)).getX();
int locY = ((PlayerCar) getWorld().getObjects(PlayerCar.class).get(0)).getY();
// Add your action code here.
if(run==true){
turnTowards(locX,locY);run=false;}
if(time<0){
world.removeObject(this);time=100;}
}
}
