#include <Person.h>
Inheritance diagram for Person:

Public Member Functions | |
| Person (List *personInfo, int x, int y) | |
| ~Person () | |
| void | draw () |
| void | collide (Object *o) |
| virtual void | update () |
| void | jump (xDirection xDir) |
| void | jumpReset () |
| void | crouch () |
| void | uncrouch () |
| void | shoot () |
| virtual void | setPos (int x, int y) |
| virtual Object * | copy () |
| void | load (List *personInfo, bool fromConstructor=true) |
| void | setVelocity (int x, int y) |
| int | getHealth () |
| virtual void | addHealth (int dHealth) |
| void | incrVelocity (int xVel, int yVel) |
| void | setXDirection (xDirection xDir) |
| int | getAccel () |
| xDirection | getXDirection () |
| yDirection | getYDirection () |
| void | aim (yDirection direction) |
| bool | touchingAbove (int pels=1) |
| bool | touchingBelow (int pels=1) |
| bool | touchingLeft (int pels=1) |
| bool | touchingRight (int pels=1) |
| virtual bool | invincible () |
| virtual void | setInvincible (bool inv) |
| virtual void | die () |
| virtual void | live () |
Protected Attributes | |
| bool | _invincible |
| int | _xVelocity |
| int | _yVelocity |
| int | _maxXVel |
| int | _maxYVel |
| int | _maxFallRate |
| int | _previousX |
| int | _previousY |
| xDirection | _xDirection |
| xDirection | _prevXDirection |
| yDirection | _yDirection |
| State | _state |
| std::string | _dropItem |
| bool | _crouching |
| int | _health |
| int | _gravity |
| int | _accel |
| int | _airAccel |
| double | _groundDrag |
| double | _airDrag |
| int | _jumpTimer |
| int | _maxJumpTime |
| bool | _jumpReset |
| bool | _wallJumpReset |
| int | _wallFallTime |
| Weapon * | _primaryWeapon |
| WeaponPunch * | _punchWeapon |
| int | _punchTimer |
| ShowOneSprite * | _sprite |
Definition at line 14 of file Person.h.
|
||||||||||||||||
|
Definition at line 45 of file Person.cpp. References Object::_box, Object::_collidable, _previousX, _previousY, and load(). Referenced by copy(). |
|
|
Definition at line 149 of file Person.cpp. References _primaryWeapon, and _punchWeapon. |
|
|
Reimplemented in Player. Definition at line 520 of file Person.cpp. References _health, _invincible, Object::_type, die(), ENEMY, CommandManager::execute(), CommandManager::instance(), and PLAYER. Referenced by Player::addHealth(), and AddHealthCommand::execute(). |
|
|
Definition at line 53 of file Person.h. References _yDirection. Referenced by AimCommand::execute(). |
|
|
Reimplemented from Object. Reimplemented in Player. Definition at line 171 of file Person.cpp. References Object::_box, _previousX, _previousY, Object::_type, _xVelocity, _yVelocity, DOOR, ENEMY, Object::getBox(), Object::getType(), glfuncs::intersectX(), glfuncs::intersectY(), PLAYER, TILE, Level::tileHeight, and touchingAbove(). Referenced by Player::collide(). |
|
|
Reimplemented from Object. Reimplemented in Enemy, and Player. Definition at line 157 of file Person.cpp. References _primaryWeapon, Weapon::copy(), and Person(). |
|
|
Make the person crouch Definition at line 447 of file Person.cpp. References Object::_box, _crouching, _previousX, _previousY, _sprite, Sprite::setHeight(), and touchingBelow(). Referenced by CrouchCommand::execute(). |
|
|
Schedules the calling object for deletion. Reimplemented in Enemy, and Player. Definition at line 478 of file Person.cpp. References Object::_box, Object::_collidable, _dropItem, Object::getBox(), Level::instance(), Object::loadObject(), Level::registerObject(), Level::scheduleDelete(), and Object::setPos(). Referenced by addHealth(), Player::die(), and Enemy::die(). |
|
|
Implements Object. Definition at line 208 of file Person.cpp. References Object::_box, _sprite, _state, _xDirection, CROUCHING, DEAD, ShowOneSprite::draw(), FALLING, JUMPING, PUNCHING, RUNNING, Sprite::setDirection(), ShowOneSprite::show(), STANDING, and WALLFALLING. |
|
|
Definition at line 348 of file Person.cpp. References _accel, _airAccel, and touchingBelow(). Referenced by MoveCommand::execute(). |
|
|
Definition at line 37 of file Person.h. References _health. Referenced by Level::drawHUD(). |
|
|
Definition at line 49 of file Person.h. References _xDirection. Referenced by WeaponPunch::shoot(). |
|
|
Definition at line 50 of file Person.h. References _yDirection. |
|
||||||||||||
|
Definition at line 334 of file Person.cpp. References _maxFallRate, _maxXVel, _xVelocity, and _yVelocity. Referenced by MoveCommand::execute(), and update(). |
|
|
Definition at line 60 of file Person.h. References _invincible. |
|
|
Definition at line 356 of file Person.cpp. References _crouching, _jumpReset, _jumpTimer, _maxJumpTime, _maxXVel, _maxYVel, _prevXDirection, _wallJumpReset, _xDirection, _xVelocity, _yVelocity, LEFT, RIGHT, touchingAbove(), touchingBelow(), touchingLeft(), and touchingRight(). Referenced by JumpCommand::execute(). |
|
|
Definition at line 421 of file Person.cpp. References _jumpReset, _jumpTimer, _maxJumpTime, _sprite, _wallJumpReset, and ShowOneSprite::reset(). Referenced by JumpResetCommand::execute(). |
|
|
Definition at line 415 of file Person.cpp. References _invincible, _state, and STANDING. |
|
||||||||||||
|
Reimplemented from Object. Reimplemented in Enemy. Definition at line 83 of file Person.cpp. References _accel, _airAccel, _airDrag, Object::_box, _dropItem, _gravity, _groundDrag, _health, _maxFallRate, _maxJumpTime, _maxXVel, _maxYVel, _primaryWeapon, _punchWeapon, _sprite, Object::load(), and Sprite::loadSprite(). Referenced by Enemy::load(), and Person(). |
|
|
Definition at line 61 of file Person.h. References _invincible. |
|
||||||||||||
|
Reimplemented from Object. Definition at line 164 of file Person.cpp. References _previousX, _previousY, and Object::setPos(). Referenced by WeaponPunch::shoot(). |
|
||||||||||||
|
Definition at line 35 of file Person.h. References _xVelocity, and _yVelocity. Referenced by StopPersonCommand::execute(). |
|
|
Definition at line 46 of file Person.h. References _prevXDirection, and _xDirection. Referenced by TurnCommand::execute(), and MoveCommand::execute(). |
|
|
Definition at line 429 of file Person.cpp. References _crouching, _primaryWeapon, _punchTimer, _punchWeapon, _state, PUNCHING, WeaponPunch::shoot(), and Weapon::shoot(). Referenced by ShootCommand::execute(). |
|
|
Definition at line 491 of file Person.cpp. References Object::_box, and CollisionHandler::ObjsColliding(). Referenced by collide(), jump(), and uncrouch(). |
|
|
Definition at line 498 of file Person.cpp. References Object::_box, and CollisionHandler::ObjsColliding(). Referenced by crouch(), getAccel(), jump(), update(), and Enemy::update(). |
|
|
Definition at line 505 of file Person.cpp. References Object::_box, and CollisionHandler::ObjsColliding(). |
|
|
Definition at line 512 of file Person.cpp. References Object::_box, and CollisionHandler::ObjsColliding(). |
|
|
Uncrouches the person Definition at line 462 of file Person.cpp. References Object::_box, _crouching, _previousX, _previousY, _sprite, Sprite::setHeight(), and touchingAbove(). Referenced by CrouchCommand::execute(). |
|
|
Reimplemented from Object. Reimplemented in Enemy, and Player. Definition at line 246 of file Person.cpp. References _airDrag, Object::_box, _crouching, _gravity, _groundDrag, _previousX, _previousY, _primaryWeapon, _punchTimer, _punchWeapon, _sprite, _state, _wallFallTime, _xVelocity, _yVelocity, CollisionHandler::checkCollision(), CROUCHING, DEAD, FALLING, Screen::FRAMERATE, incrVelocity(), CollisionHandler::instance(), JUMPING, PUNCHING, RUNNING, STANDING, touchingBelow(), touchingLeft(), touchingRight(), Weapon::update(), ShowOneSprite::update(), and WALLFALLING. Referenced by Player::update(), and Enemy::update(). |
|
|
Definition at line 101 of file Person.h. Referenced by getAccel(), and load(). |
|
|
Definition at line 102 of file Person.h. Referenced by getAccel(), and load(). |
|
|
|
|
|
Definition at line 86 of file Person.h. Referenced by Player::control(), crouch(), jump(), shoot(), uncrouch(), and update(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 98 of file Person.h. Referenced by Player::addHealth(), addHealth(), getHealth(), and load(). |
|
|
Definition at line 68 of file Person.h. Referenced by addHealth(), Enemy::die(), invincible(), live(), and setInvincible(). |
|
|
Definition at line 108 of file Person.h. Referenced by jump(), and jumpReset(). |
|
|
Definition at line 106 of file Person.h. Referenced by jump(), and jumpReset(). |
|
|
Definition at line 74 of file Person.h. Referenced by incrVelocity(), and load(). |
|
|
Definition at line 107 of file Person.h. Referenced by jump(), jumpReset(), and load(). |
|
|
Definition at line 72 of file Person.h. Referenced by incrVelocity(), jump(), and load(). |
|
|
|
|
|
Definition at line 76 of file Person.h. Referenced by collide(), crouch(), Person(), setPos(), uncrouch(), and update(). |
|
|
Definition at line 77 of file Person.h. Referenced by collide(), crouch(), Person(), setPos(), uncrouch(), and update(). |
|
|
Definition at line 80 of file Person.h. Referenced by jump(), and setXDirection(). |
|
|
Definition at line 114 of file Person.h. Referenced by Player::copy(), copy(), Enemy::copy(), load(), shoot(), update(), and ~Person(). |
|
|
|
|
|
Definition at line 115 of file Person.h. Referenced by Player::copy(), load(), shoot(), update(), and ~Person(). |
|
|
Definition at line 118 of file Person.h. Referenced by crouch(), draw(), jumpReset(), load(), uncrouch(), and update(). |
|
|
Definition at line 82 of file Person.h. Referenced by Enemy::die(), draw(), live(), shoot(), and update(). |
|
|
Definition at line 111 of file Person.h. Referenced by update(). |
|
|
Definition at line 109 of file Person.h. Referenced by jump(), and jumpReset(). |
|
|
Definition at line 79 of file Person.h. Referenced by Player::control(), draw(), getXDirection(), jump(), and setXDirection(). |
|
|
Definition at line 70 of file Person.h. Referenced by collide(), Enemy::die(), incrVelocity(), jump(), setVelocity(), and update(). |
|
|
Definition at line 81 of file Person.h. Referenced by aim(), and getYDirection(). |
|
|
Definition at line 71 of file Person.h. Referenced by collide(), Enemy::die(), incrVelocity(), jump(), setVelocity(), and update(). |
1.4.6-NO