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;
}
}
}
Alex - Project 2
on Wednesday, Nov 19, 2008 – 12:38 pm
One Comment
Alex, I need to see the rest of the code before I can grade this. Please upload all of it.