PLANETS Jessica Dantas

PImage img1;
PImage img2;
PImage img3;
PImage img4;
PImage img5;

int yPosition1 = 500, yPosition2 = 1000, yPosition3 = 1500, yPosition4 = 2000;

void setup()
{
size(1920,1080);
img1 = loadImage(“p.jpg”);

img2 = loadImage(“n .png”);

img3 = loadImage(“d.png”);

img4 = loadImage(“g.png”);

img5 = loadImage(“4.png”);
smooth();
frameRate(80);
}

void draw()
{
background(img1);
image(img2, 150, yPosition1);

image(img3, 150, yPosition2);

image(img4, 150, yPosition3);

image(img5, 150, yPosition4);
yPosition1=yPosition1-5;
yPosition2=yPosition2-5;
yPosition3=yPosition3-5;
yPosition4=yPosition4-5;
if(yPosition1==-200)
{
yPosition1=500;
}
if(yPosition2==-200)
{
yPosition2=1000;
}
if(yPosition3==-200)
{
yPosition3=1500;
}
if(yPosition4==-200)
{
yPosition4=2000;
}

}Screen Shot 2017-02-22 at 10.31.09 PM.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s