- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# Door Class Reference

`#include <Door.h>`

Inheritance diagram for Door:

List of all members.

## Public Member Functions
| Door (List *info, int x, int y)
void | draw ()
void | update ()
void | collide (Object *o)
void | load (List *info, bool fromConstructor=true)
virtual Object * | copy ()
void | setLock (bool locked)
void | setOpen (bool open)
## Private Attributes
Sprite * | _openSprite
Sprite * | _closedSprite
bool | _open
bool | _locked

## Detailed Description

Definition at line 7 of file Door.h.

## Constructor & Destructor Documentation

Door::Door | ( | List * | info,
|  | int | x,
|  | int | y
| ) |

| Definition at line 4 of file Door.cpp. References Object::_type, DOOR, and load(). Referenced by copy().

## Member Function Documentation

void Door::collide | ( | Object * | o | ) | `[virtual]`

| Reimplemented from Object. Definition at line 43 of file Door.cpp. References Object::_collidable, _locked, _open, ENEMY, Object::getType(), and PLAYER.

Object * Door::copy | ( |  | ) | `[virtual]`

| Reimplemented from Object. Definition at line 38 of file Door.cpp. References Door().

void Door::draw | ( |  | ) | `[virtual]`

| Implements Object. Definition at line 51 of file Door.cpp. References Object::_box, _closedSprite, _open, _openSprite, and Sprite::draw().

void Door::load | ( | List * | info,
|  | bool | fromConstructor = `true`
| ) | `[virtual]`

| Reimplemented from Object. Definition at line 11 of file Door.cpp. References _openSprite, Object::load(), and Sprite::loadSprite(). Referenced by Door().

void Door::setLock | ( | bool | locked | ) | `[inline]`

| Definition at line 17 of file Door.h. References _locked. Referenced by SetDoorLockCommand::execute().

void Door::setOpen | ( | bool | open | ) |

| Definition at line 60 of file Door.cpp. References Object::_box, _closedSprite, Object::_collidable, _open, _openSprite, Sprite::height(), and Sprite::width().

void Door::update | ( |  | ) | `[inline, virtual]`

| Reimplemented from Object. Definition at line 12 of file Door.h.

## Member Data Documentation

Sprite* Door::_closedSprite`[private]`

| Definition at line 21 of file Door.h. Referenced by draw(), and setOpen().

bool Door::_locked`[private]`

| Definition at line 24 of file Door.h. Referenced by collide(), and setLock().

bool Door::_open`[private]`

| Definition at line 23 of file Door.h. Referenced by collide(), draw(), and setOpen().

Sprite* Door::_openSprite`[private]`

| Definition at line 20 of file Door.h. Referenced by draw(), load(), and setOpen().

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

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