//////// /////////////// PROJECT 1 /* THE BID, BAD MONSTER CHASES THE BRAVE HERO, LITTLE HERO WHO CHASES AFTER THE GOLD, WHILE THE SUN MOVES ACROSS THE SKY */ /* Rebeca Janowicz(CST--112; first draft due on 10/21/15 */ // Global cordinates, hero, gold and monster variables float geicoX, geicoY; float coinX; //float monster = 0; float horizon; float sunX,sunY; float tree = 0; void setup (){ size(1000,800); // reset(); horizon = height/4; } void draw(){ scene(); house(50,horizon/4); tree(320,150); tree(320,185); tree2(270,150); tree(270,185); // monster (); // hero(); // gold(); } //grass and sky void scene(){ background(168,171,245); // fill(20,142,43); rect(0,horizon+100, width, height*3/4); } // HOUSE void house(float x, float y ) { stroke(0); fill(167,161,98); rect(x+50,y+300,150,125); // body fill(77,66,67); triangle(x+50, y+300, x+125, y+175, x+200,y+ 300); // roof fill(160,10,20); rect(x+90,y+190,20,60); // cheminee fill(255); rect(x+65,y+310,30,50); // windows rect(x+155,y+310,30,50); // windows fill(75,71,57); rect(x+105,y+370,30,55); // door fill(0); } //TREE void tree (float x, float y) { fill(19,131,49); noStroke(); triangle(x+40,y+65,x+80,y+10,x+115,y+65); } void tree2 (float x1, float y1) { triangle(x1+40,y1+65,x1+80,y1+10,x1+115,y1+65); }