2020年11月16日 星期一

1111

 PImage img;

PImage imgback;

PImage imgbrid;

int t=0;

void setup() {

  size(1500, 1000);

  img=loadImage("1.png");

  imgback=loadImage("back.png");

  imgbrid=loadImage("brid.png");

  background(255); 

  image(imgback, 30, 30, 125, 93);

  image(img, 361, 111, 777, 777);

}

void draw() {

  if (t%2==0)

  {

    if (mousePressed)

    {

      fill(255);

      ellipse(mouseX, mouseY, 30, 30);

    }

  } else

  {

    if (mousePressed)

    {

      fill(0);

      ellipse(mouseX, mouseY, 30, 30);

    }

  }

}

  void mouseReleased()

  { 

    t++;

  }





沒有留言:

張貼留言