Object Classes and PImages
in
Programming Questions
•
1 year ago
Hi,
I have written an object class that has all the characteristics I want, now I want to reuse if a bunch of times with different PImages. Here's what it looks like:
- class ShapeMove
- {
- int x;
- int y;
- int h;
- int w;
- int origx;
- int origy;
- int deltax;
- int deltay;
- int posXdiff;
- int posYdiff;
- int xdragdelta;
- int ydragdelta;
- boolean locked = false;
- boolean imCaptured = false;
- boolean selected;
- // boolean overMe = false;
- //
- ShapeMove(PImage lamppost, int _x, int _y, int _w, int _h)
- {
- x = _x;
- y = _y;
- h = _h;
- w = _w;
- }
- void display()
- {
- image(lamppost, x, y, w, h);
- }
- }
How do I use different PImages for different instances of my ShapeMove object?
Thanks for the help.
1