is that even possible to do?


1 2 3 4 5 6 7 8 9 10 11 12 | /** field */ private int mRot = 0 ; // movement rotation /** act method */ public void act() { int tRot = getRotation(); setRotation(mRot); // all normal act method (movement) stuff here mRot = getRotation(); setRotation(tRot+ 10 ); tumbling } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | protected void addedToWorld(World world) { Space space = (Space)getWorld(); Spaceship spaceship = space.getSpaceship(); if (spaceship.getWorld() == null ) return ; turnTowards(spaceship.getX(), spaceship.getY()); } public void movement() { int tRot = getRotation(); //tumble rotation setRotation(mRot); move( 6 ); mRot = getRotation(); setRotation(tRot+ 10 ); //tumbling } |