Alex - Project 2

By potmesila
int score = 0; PFont font; int frame = 1; Rock r; Water w; Water2 w2; void setup(){ w = new Water(.07, -10); w2 =new Water2(.1, -10); r = new Rock (1.5, 50, 335); size (600, 400); noStroke(); smooth(); font = loadFont("ArialNarrow-Bold-48.vlw"); textFont(font); frameRate(40); } void draw(){ if (frame == 1) { text("INTRO PG", 50, 200); println("into page"); } else if (frame ==2) { background(255); w.display(); w.move(); w2.display(); w2.move(); r.display(); r.move(); println("playing the game"); } else if (frame ==3){ println("scoreboard"); } } void keyPressed(){ if (frame == 1) { if ((key == ENTER)||(key==RETURN)) { frame = 2; } } else if (frame == 3) { if ((key == ENTER)||(key==RETURN)) { frame = 1; } } }

One Comment

  1. Posted November 26, 2008 at 4:33 pm | Permalink

    Alex, I need to see the rest of the code before I can grade this. Please upload all of it.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*