08 May 2011
To animate the bubbles we made yesterday, we’ll need to add a new method to our Bubble class: the
update() method. If we call this method before we call the
render() method on our bubble objects inside
draw(), the y-position of the bubble will change, and the bubble will be rendered on a new coordinate. The update method looks like this.