Permalink
Browse files

game-stages

creating game stages - stages as image portfolio
  • Loading branch information...
3milychu committed Aug 5, 2017
1 parent 5480706 commit df0ed469117ffd28cee3a0c6256227e17552051d
Showing with 39 additions and 0 deletions.
  1. BIN stages/pic1.png
  2. BIN stages/pic2.png
  3. BIN stages/pic3.png
  4. +39 −0 stages/stages.pde
View
BIN +1.26 MB stages/pic1.png
Binary file not shown.
View
BIN +1.03 MB stages/pic2.png
Binary file not shown.
View
BIN +3.97 MB stages/pic3.png
Binary file not shown.
View
@@ -0,0 +1,39 @@
//declare variables
float x;
float y;
PImage image1;
PImage image2;
PImage image3;
int stage;
void setup(){
size(1300,800);
x = 1300;
y = 800;
stage = 1;
image1 = loadImage("pic1.png");
image2 = loadImage("pic2.png");
image3 = loadImage("pic3.png");
}
void draw(){
if (stage == 1){
image(image1, 0, 0, 1300,800);
} else if (stage == 2){
image(image2, 0, 0, 1300, 800);
} else if (stage == 3){
image(image3, 0, 0, 1300, 800);
}
}
void keyPressed(){
if(keyPressed){
if(key == '1'){
stage = 1;
} else if (key == '2'){
stage = 2;
} else if (key == '3'){
stage = 3;
}
}
}

0 comments on commit df0ed46

Please sign in to comment.