Jessica Dantas Design

 

 

screen-shot-2017-02-08-at-9-48-38-pm

Coding:

PImage img;
PImage img2;
int yPosition=500;

void setup()
{
size(500, 500);
img = loadImage(“bg.jpg”);
img2 = loadImage(“sun_image.png”);
smooth();
frameRate(60);
}

void draw()
{
background(img);
image(img2, 150, yPosition);
yPosition=yPosition-1;
if(yPosition==-200)
{
yPosition=500;
}

}

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