- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# Enemy Class Reference

`#include <Enemy.h>`

Inheritance diagram for Enemy:

List of all members.

## Public Member Functions
| Enemy (List *enemyInfo, int x, int y)
| ~Enemy ()
void | update ()
void | die ()
virtual Object * | copy ()
void | activate ()
void | disable ()
void | load (List *enemyInfo, bool fromConstructor=true)
## Private Attributes
List * | _deathScript
AItype | _brain
List * | _script
int | _brainWait
int | _scriptWait
int | _brainTime
int | _scriptTime
int | _brainBurst
int | _brainBurstTime
int | _pointValue
bool | _active

## Detailed Description

Definition at line 10 of file Enemy.h.

## Constructor & Destructor Documentation

Enemy::Enemy | ( | List * | enemyInfo,
|  | int | x,
|  | int | y
| ) |

| Definition at line 13 of file Enemy.cpp. References Object::_depth, Object::_type, ENEMY, and load(). Referenced by copy().

Enemy::~Enemy | ( |  | ) |

| Definition at line 23 of file Enemy.cpp. References _deathScript, and _script.

## Member Function Documentation

void Enemy::activate | ( |  | ) | `[inline]`

| Definition at line 19 of file Enemy.h. References _active.

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

| Reimplemented from Person. Definition at line 29 of file Enemy.cpp. References _deathScript, Person::_primaryWeapon, _script, Weapon::copy(), and Enemy().

void Enemy::die | ( |  | ) | `[virtual]`

| Schedules the calling object for deletion. Reimplemented from Person. Definition at line 184 of file Enemy.cpp. References _brain, _deathScript, Person::_invincible, _pointValue, _script, Person::_state, Person::_xVelocity, Person::_yVelocity, Level::addKill(), Level::addScore(), DEAD, Person::die(), Level::instance(), CommandManager::instance(), NONE, and CommandManager::startPlaying().

void Enemy::disable | ( |  | ) | `[inline]`

| Definition at line 20 of file Enemy.h. References _active.

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

| Reimplemented from Person. Definition at line 40 of file Enemy.cpp. References _brain, FACTORYBOSS, FOLLOWSHOOT, FOLLOWSHOOTAHEAD, JUMP, Person::load(), NONE, RUNAWAY, SITANDSHOOT, and STREETBOSS. Referenced by Enemy().

void Enemy::update | ( |  | ) | `[virtual]`

| Reimplemented from Person. Definition at line 114 of file Enemy.cpp. References _active, _brain, _brainBurst, _brainBurstTime, _brainTime, _brainWait, _script, _scriptTime, _scriptWait, DOWN, FACTORYBOSS, FOLLOWSHOOT, FOLLOWSHOOTAHEAD, CommandManager::instance(), JUMP, NONE, RUNAWAY, SITANDSHOOT, CommandManager::startPlaying(), STREETBOSS, Person::touchingBelow(), and Person::update().

## Member Data Documentation

bool Enemy::_active`[private]`

| Definition at line 39 of file Enemy.h. Referenced by activate(), disable(), and update().

AItype Enemy::_brain`[private]`

| Definition at line 26 of file Enemy.h. Referenced by die(), load(), and update().

int Enemy::_brainBurst`[private]`

| Definition at line 35 of file Enemy.h. Referenced by update().

int Enemy::_brainBurstTime`[private]`

| Definition at line 36 of file Enemy.h. Referenced by update().

int Enemy::_brainTime`[private]`

| Definition at line 32 of file Enemy.h. Referenced by update().

int Enemy::_brainWait`[private]`

| Definition at line 29 of file Enemy.h. Referenced by update().

List* Enemy::_deathScript`[private]`

| Definition at line 24 of file Enemy.h. Referenced by copy(), die(), and ~Enemy().

int Enemy::_pointValue`[private]`

| Definition at line 38 of file Enemy.h. Referenced by die().

List* Enemy::_script`[private]`

| Definition at line 27 of file Enemy.h. Referenced by copy(), die(), update(), and ~Enemy().

int Enemy::_scriptTime`[private]`

| Definition at line 33 of file Enemy.h. Referenced by update().

int Enemy::_scriptWait`[private]`

| Definition at line 30 of file Enemy.h. Referenced by update().

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

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