Thank you!
The Tower class needs an object of the body in the constructor to be created. So the body is saved in the Tower, so that the Tower can get the coordinates of the tower. It is like this:
public class Tower{
private Body tank;
public Tower(Body tank){
this.tank = tank;
}
public void act(){
follow();
}
public void follow(){
setLocation(tank.getX(), tank.getY());
}
}
There is much more stuff, too, for example to shoot. If you have more questions ask, it's no problem. :)
2013/10/7
CombinatorialCircuitEditor
2013/10/6
FRUP's Raycast!
2013/10/6
Viral Spiral
2013/10/6
Tiny Tank
2013/10/5
ch2_6
2013/10/5
Forgotten Memories
2013/10/5
Math Cube Maze
2013/10/3
FRUP's Raycast!
2013/10/1
[alpha] Earth Demo