Class: Collision

Collision

new Collision(p_walls, p_balls)

Creates an instance of Collision. The main method handleCollision detects collisions between the ball and a wall.
This:
Parameters:
Name Type Description
p_walls Object The walls of the game: An object with four integer attributes: left, right, top, and bottom.
p_balls Ball The balls of the game.
Source:

Methods

handleCollision()

Detects collisions between the ball and a wall, between the paddle and the wall, and between the ball and the paddle. If a collision is detected, the collision is handled.
Source:

handleMouseClick(p_mouse_pos)

Parameters:
Name Type Description
p_mouse_pos Object
Source:
Returns:
The index of the ball that has been hit, if any.
W. Kowarschick © 2013 (CC BY-NC-SA 3.0: http://creativecommons.org/licenses/by-nc-sa/3.0/)
Documentation generated by JSDoc 3.3.0-dev on Mon Nov 04 2013 11:02:51 GMT+0100 (MEZ) using the DocStrap template.