// A simple Box class class Box { float x, y, v; Box(float tx, float ty) { x = tx; // x position y = ty; // y position v = 0.0; // y velocity } void draw() { fill(200); rect(x, y, 20, 20); } boolean update(){ y += v; v += 0.02; return (y>height); } }