Advertisement
Guest User

Untitled

a guest
Apr 8th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1.  
  2. class Player {
  3.  
  4.     Input input;
  5.  
  6.     Player(Input input) {
  7.         this.input = input;
  8.     }
  9.  
  10.     void update(delta) {
  11.         if (input.justTouched()) {
  12.             ....
  13.         }
  14.     }
  15.  
  16. }
  17.  
  18. class Game {
  19.     create() {
  20.         Player player1 = new Player(new RemoteInput(8890));
  21.         Player player2 = new Player(new RemoteInput(8891));
  22.     }
  23.  
  24.     render() {
  25.         player1.update();
  26.         player2.update();
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement