int fgpState; Plum plum; ArrayList blossoms; Drizzle drizzle; boolean rendered = false; float kk =0; int total = 0; int plumStateCount = 0; Orchid orchid; int leafCount; int maxLeaves; int orchidStateCount = 0; Shower[] showers; int totalShowers =0; int showerStateCount = 0; Fog[] fogs; int totalFogs =0; int fogStateCount = 0; Chrysanthemum[] chrysanthemum = new Chrysanthemum[8]; ArrayList chryLeaves; ArrayList chryFlower; int chrysanthemumStateCount = 0; Bamboo bamboo; int bambooCount; int bambooStateCount =0; Snow[] snows; int totalSnows =0; int snowsStateCount =0; void setup(){ size(1200,150); colorMode(RGB,255,255,255,100); background(255); smooth(); blossoms = new ArrayList(); plum = new Plum(); drizzle = new Drizzle(); orchid = new Orchid(random(width), height+10); maxLeaves = 100; showers = new Shower[200]; fogs = new Fog[100]; chryLeaves = new ArrayList(); chryFlower = new ArrayList(); for(int i=0; i blossoms.size() ) total = blossoms.size(); for ( int k =0 ; k < total; k++ ) { Blossom this_blossom = (Blossom) blossoms.get(k); this_blossom.render(); this_blossom.move(); } for ( int k = total; k < blossoms.size(); k++ ) { Blossom this_blossom = (Blossom) blossoms.get(k); this_blossom.setRendered(false); this_blossom.render(); } plumStateCount = plumStateCount+1; //print("plumStateCount"+plumStateCount); } if (plumStateCount == 300) { plumStateCount = 0; fgpState = 1; plum.branchCounter =0; } } else if (fgpState == 1){ if (orchid.timer == 0){ leafCount = leafCount +1; //println(leafCount); } if (leafCount= showers.length){ totalShowers = 0; //Start over showerStateCount = showerStateCount+1; //print("showerStateCount" + showerStateCount); } for (int i=0; i < totalShowers; i++){ showers[i].display(); showers[i].move(); } if (showerStateCount == 3){ showerStateCount = 0; fgpState = 3; } } else if (fgpState == 3){ fogs[totalFogs] = new Fog(); totalFogs++; if(totalFogs >= fogs.length){ totalFogs = 0; //Start over } for (int i=0; i < totalFogs; i++){ fogs[i].display(); fogs[i].move(); } fogStateCount = fogStateCount+1; //print("fogStateCount" + fogStateCount); if (fogStateCount == 35){ fogStateCount = 0; fgpState = 4; fill(255); rect(0,0,width,height); } } else if (fgpState == 4){ for(int i=0; i600){ fill(255,(chrysanthemumStateCount-600)/2); rect(0,0,width, height); } chrysanthemumStateCount = chrysanthemumStateCount+1; //print("chrysanthemumStateCount" + chrysanthemumStateCount); if (chrysanthemumStateCount == 825){ chrysanthemumStateCount = 0; fgpState = 5; } } else if (fgpState == 5){ //fill(255,255-bambooStateCount); //rect(0,0,width,height); bamboo.update(); bamboo.display(); bambooStateCount = bambooStateCount+1; //print("bambooStateCount" + bambooStateCount); if (bambooStateCount == 2000){ bambooStateCount = 0; fgpState = 6; } } else if (fgpState == 6){ fill(255,1*snowsStateCount); rect(0,0,width,height); snows[totalSnows] = new Snow(); totalSnows++; if(totalSnows >= snows.length){ totalSnows = 0; //Start over } for (int i=0; i < totalSnows; i++){ snows[i].display(); snows[i].move(); } snowsStateCount = snowsStateCount+1; //print("snowsStateCount" + snowsStateCount); if (snowsStateCount == 200){ snowsStateCount = 0; fgpState = 7; } } else if (fgpState == 7){ fgpState=0; //print("start again"); plum = new Plum(); } } ///orchid drawing function void drawSegment(float x1,float y1,float x2,float y2,float t) { float xDif,yDif,w; pushMatrix(); xDif = x2-x1; yDif = y2-y1; translate(x1,y1); rotate(atan2(yDif,xDif)); w=sqrt(sq(xDif)+sq(yDif)); noStroke(); ///// Draw Flower //println("draw segment"); //if ( leafCount == 5 || orchid.timer == 50 ) { if ( int(random(5,10))