// Bryan Blackford - bblackfo@ucsc.edu // mountains give parallax effect and hide monster class Mountain { float xpos; // left edge float ypos; // bottom edge int high; int wide; float mid; Mountain(float X,float Y,int High,int Wide) { xpos = X; ypos = Y; high = High; wide = Wide; mid = Wide/2; } void update() { xpos += .1; draw(); } void draw() { stroke(0); fill(0); triangle(xpos,ypos,xpos+mid,ypos-high,xpos+wide,ypos); } }