Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class JitterBug {
- float x;
- float y;
- int diameter;
- float speed = 2.5;
- int gray;
- JitterBug(float tempX, float tempY, int tempDiameter, int tempGray) {
- x = tempX;
- y = tempY;
- diameter = tempDiameter;
- gray = tempGray;
- }
- void move() {
- x += random(-speed, speed);
- y += random(-speed, speed);
- }
- void display() {
- fill(gray);
- ellipse(x, y, diameter, diameter);
- }
- }
Add Comment
Please, Sign In to add comment