How do you add gravity? also how do you code platforms?
The DoctorProfessor is out!


1 2 3 4 5 6 7 | private double velY; //the actors y movement; public void act() { velY += ((YourWorld) getWorld().GRAVITY; //to use the gravity like this you should declare it public static final; //... some other stuff; setLocation(getX() + velX, getY() + velY); } |