Assignment 4 – Add an Image

Add an image to the player or doodle jump sketch

The existing draw code is in the player class – in a function called display()

It sets the color and then draws a rectangle.

You need to replace that code with an image of your choice.  Use the processing image here

Place the variable just above the setup function:

PImage img;

Then load the image in your setup function

then replace the rectangle call with this

image(img, x,y,100,100);  ( replace 100 with the image size you want ) 

If you can use .png format file then all the better

Leave a Reply

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

You are commenting using your 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