Processing Forum
Ball ball;
Block block;
Collision cl;
void setup() {
size(500, 500);
background(0, 0, 0);
ball = new Ball();
block = new Block();
cl = new Collision(ball.xpos, ball.rad, ball.ypos, block.width, block.height, block.control);
}
void draw() {
background(0, 0, 0);
ball.move();
block.Control();
block.display();
}
class Collision {Ball ball = new Ball();Block block = new Block();int ball_xpos;int ball_rad;int ball_ypos;int block_width;int block_height;int block_control;Collision(ball.xpos, ball.rad, ball.ypos, block.width, block.height, block.control ) {}
void detect_() {//not done yet}}