- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# CollisionHandler Class Reference

`#include <CollisionHandler.h>`

List of all members.

## Public Member Functions
bool | checkCollision (Object *o)
## Static Public Member Functions
static CollisionHandler * | instance ()
static std::vector< Object * > | ObjsColliding (Object *o, bool solidonly=false)
## Private Member Functions
| CollisionHandler ()
## Private Attributes
Level * | _currentLevel
## Static Private Attributes
static CollisionHandler * | _instance = NULL

## Detailed Description

Definition at line 10 of file CollisionHandler.h.

## Constructor & Destructor Documentation

CollisionHandler::CollisionHandler | ( |  | ) | `[private]`

| Definition at line 15 of file CollisionHandler.cpp. Referenced by instance().

## Member Function Documentation

bool CollisionHandler::checkCollision | ( | Object * | o | ) |

| Definition at line 27 of file CollisionHandler.cpp. References Object::collide(), ObjsColliding(), and Object::solid(). Referenced by Person::update(), and Bullet::update().

CollisionHandler * CollisionHandler::instance | ( |  | ) | `[static]`

| Definition at line 20 of file CollisionHandler.cpp. References _instance, and CollisionHandler(). Referenced by Person::update(), and Bullet::update().

std::vector< Object * > CollisionHandler::ObjsColliding | ( | Object * | o,
|  | bool | solidOnly = `false`
| ) | `[static]`

| (o->getType() == PLAYER && (*i)->getType() == BOSS) && Definition at line 46 of file CollisionHandler.cpp. References Object::collidable(), Object::getBox(), Level::getObjects(), Level::getTile(), Level::instance(), Level::tileHeight, and Level::tileWidth. Referenced by checkCollision(), WeaponPunch::shoot(), Person::touchingAbove(), Person::touchingBelow(), Person::touchingLeft(), and Person::touchingRight().

## Member Data Documentation

Level* CollisionHandler::_currentLevel`[private]`

| Definition at line 23 of file CollisionHandler.h.

CollisionHandler * CollisionHandler::_instance = NULL`[static, private]`

| Definition at line 21 of file CollisionHandler.h. Referenced by instance().

The documentation for this class was generated from the following files:

- C:/Documents and Settings/jegan/Desktop/projectX/CollisionHandler.h
- C:/Documents and Settings/jegan/Desktop/projectX/CollisionHandler.cpp