topical media & game development
graphic-processing-learning-10-example-10-2-example-10-2.pde / pde
// Learning Processing
// Daniel Shiffman
// http://www.learningprocessing.com
// Example 10-2: Bouncing ball class
// Two ball variables
Ball ball1;
Ball ball2;
void setup() {
size(400,400);
smooth();
// Initialize balls
ball1 = new Ball(64);
ball2 = new Ball(32);
}
void draw() {
background(255);
// Move and display balls
ball1.move();
ball2.move();
ball1.display();
ball2.display();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.