Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public Background(final int xCoordinate, final int yCoordinate, final String background)
  2. throws MissingBackgroundException {
  3.  
  4. this.x = xCoordinate;
  5. this.y = yCoordinate;
  6.  
  7. this.speed = INITIAL_SPEED;
  8.  
  9. // Retrieve background image from file
  10. try {
  11. image = ImageIO.read(new File(
  12. "Graphics/Backgrounds/"+background));
  13. } catch (Exception e) {
  14. System.out.println("Error loading background");
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement