Hello, how to accelerate my missile shot by my tank over time? the idea is when i shoot the missile it move a little time very slowly forward and then accelerates to its target.
next code didnt work:
maybe other idea?
public class Missile extends Actor
{
int speedTeller = 0;
public Missile(int rotation)
{
setRotation(rotation);
}
/**
* Act - do whatever the Missile wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
while(speedTeller <= 30){
move(1);
speedTeller++;
}
while(speedTeller > 30 && speedTeller < 150){
move(5 + speedTeller/30);
speedTeller++;
}
