Files
processing4/android/examples/Topics/Create Shapes/PolygonPShapeOOP/PolygonPShapeOOP.pde
2013-02-13 11:13:43 -05:00

31 lines
441 B
Plaintext

/**
* PolygonPShapeOOP.
*
* Wrapping a PShape inside a custom class
*/
// A Star object
Star s1, s2;
void setup() {
size(640, 360, P2D);
orientation(LANDSCAPE);
// Make a new Star
s1 = new Star();
s2 = new Star();
}
void draw() {
background(51);
s1.display(); // Display the first star
s1.move(); // Move the first star
s2.display(); // Display the second star
s2.move(); // Move the second star
}