Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. package world;
  2.  
  3. import de.ur.mi.graphics.Image;
  4.  
  5. public class Stars {
  6.     private double distance;
  7.     private Image stars;
  8.  
  9.     public Stars(double xPos, double yPos, int width, int height, String src, double distance) {
  10.         this.distance = distance;
  11.         createImage(xPos, yPos, width, height, src);
  12.     }
  13.  
  14.     private void createImage(double xPos, double yPos, int width, int height, String src) {
  15.         stars = new Image(xPos, yPos, width, height, src);
  16.     }
  17.     public void draw(){
  18.         stars.draw();
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement