앞서나가는 사냥꾼님의 이글루입니다

kshpbo830.egloos.com

포토로그



2019_1 Interactive Video Week 5










PImage cheerRed;
PImage cheerGreen;
PImage cheerBlue;
PImage runner1;
PImage runner2;
PImage runner3;
PImage background;

float runnerxpos=30;
float runnerypos=500;
float runnerypos3=runnerypos;
float cheerypos=120;

float clickCount=0;

void setup (){
  size(700,400);
  background=loadImage("background.png");
  cheerRed=loadImage("cheer_red.png");
  cheerGreen=loadImage("cheer_green.png");
  cheerBlue=loadImage("cheer_blue.png");
  runner1=loadImage("runner_01.png");
  runner2=loadImage("runner_02.png");
  runner3=loadImage("runner_03.png");
}

void draw (){
 image(background,0,0);
 
  if (runnerxpos>570) {
  runnerxpos=570;
  runnerypos=1000;
  runnerypos3=10;
  image(runner1,runnerxpos,runnerypos);
  image(runner2,runnerxpos,runnerypos);
  }
 
 if (clickCount%2==1) {
  image(runner1,runnerxpos,runnerypos-490);
  image(runner2,runnerxpos,runnerypos);
  image(runner3,runnerxpos,runnerypos3);
  
  image(cheerGreen,-50,130);
  image(cheerBlue,450,130);
  image(cheerRed,200,145);

  }else{
    
  image(runner1,runnerxpos,runnerypos);
  image(runner2,runnerxpos,runnerypos-490);
  image(runner3,runnerxpos,runnerypos3);
  
  image(cheerGreen,-50,145);
  image(cheerBlue,450,145);
  image(cheerRed,200,130);
 }
 
}

void mousePressed(){
  clickCount+=1;  
  runnerxpos+=10;
}




덧글

댓글 입력 영역