How to use PImage in a class?
in
Programming Questions
•
2 years ago
Hi, I am making a program which has many objects so I want to create classes for them. One of my objects is an image of a dog that moves with mouseX, mouseY. When I make a class the image does not draw.
The lines of code I used are:
PImage dog;
void setup(){
dog = loadImage("dog.jpg");
}
void draw()
image(dog, mouseX, mouseY);
How would I turn this into a class and how would I call it because I cannot get it to work when I turn it into a class. Thanks
1