Guest User

Untitled

a guest
Nov 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public class MovedorSprite implements Runnable {
  2.        
  3.     private Sprite fantasma;
  4.     private boolean mover;
  5.    
  6.     public MovedorSprite( Sprite fantasma ) {
  7.    
  8.         this.fantasma = fantasma;
  9.         this.mover = true;
  10.    
  11.     }
  12.    
  13.     public void run() {
  14.        
  15.         while( mover ) {
  16.             fantasma.move(); //aqui move pra algum lugar
  17.         }
  18.    
  19.     }
  20.    
  21.     public void destroy() {
  22.         this.mover = false;
  23.     }
  24.  
  25. }
Add Comment
Please, Sign In to add comment