Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MovedorSprite implements Runnable {
- private Sprite fantasma;
- private boolean mover;
- public MovedorSprite( Sprite fantasma ) {
- this.fantasma = fantasma;
- this.mover = true;
- }
- public void run() {
- while( mover ) {
- fantasma.move(); //aqui move pra algum lugar
- }
- }
- public void destroy() {
- this.mover = false;
- }
- }
Add Comment
Please, Sign In to add comment