Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player {
- Input input;
- Player(Input input) {
- this.input = input;
- }
- void update(delta) {
- if (input.justTouched()) {
- ....
- }
- }
- }
- class Game {
- create() {
- Player player1 = new Player(new RemoteInput(8890));
- Player player2 = new Player(new RemoteInput(8891));
- }
- render() {
- player1.update();
- player2.update();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement