package graphic; import noise.NoiseGenerator; import processing.core.*; public class Moon extends Graphic{ PApplet p; NoiseGenerator n; double xOff; PVector position; int colorGiven; double xPlus; float resolution; float radians; PImage moon; public Moon(PApplet p, NoiseGenerator n, float x, float y, int c){ super(p, n, x, y, c); this.n = n; this.p = p; position = new PVector(x,y); colorGiven = c; xOff = 0.01; xPlus = 0.42; radians = 60; try{ moon = p.loadImage("../images/moon.png"); }catch(NullPointerException e){ p.println("There is an error with the image file."); } } void drawMe(){ } public void drawMeNight(){ p.pushMatrix(); p.translate(position.x, position.y); p.imageMode(p.CORNER); p.image(moon, 0, 0, 50, 40); p.popMatrix(); } }