Player Class Reference
#include <player.h>
List of all members.
Constructor & Destructor Documentation
Member Function Documentation
| void Player::decrementHP |
( |
unsigned int |
h |
) |
[inline] |
Decrement a player's hp when they are hit by a monster.
- Parameters:
-
| h | The player loses this amount of hitpoints. |
| bool Player::getAlive |
( |
|
) |
const [inline] |
Gets a bool of whether the player is still alive.
| unsigned int Player::getAR |
( |
|
) |
const [inline] |
Gets an unsigned int of the player's attack rating.
| unsigned int Player::getDR |
( |
|
) |
const [inline] |
Gets an unsigned int of the player's defense rating.
| int Player::getHP |
( |
|
) |
const [inline] |
Returns an int of the player's hit points.
| unsigned int Player::getLevel |
( |
|
) |
const [inline] |
Gets the player's level in the dungeon.
| bool Player::getMove |
( |
|
) |
const [inline] |
Returns a bool of whether or not the player has moved this frame. Used as a trigger to update monsters.
| ez::Point Player::getOldPosition |
( |
|
) |
const [inline] |
Gets the ez::Point of the player position before the update function is called.
| unsigned int Player::getPlayerLevel |
( |
|
) |
const [inline] |
Gets the player's level of their character. Higher level => more powerful character.
| ez::Point Player::getPosition |
( |
|
) |
const [inline] |
| unsigned int Player::getXP |
( |
|
) |
const [inline] |
Gets the player's experience points.
| void Player::incrementXP |
( |
unsigned int |
xp |
) |
[inline] |
Increments player's xp.
Can be used when player kills a monster, for example.
- Parameters:
-
| xp | Player's experience points are incremented by this value. |
| void Player::setKeyRepeat |
( |
bool |
repeater |
) |
|
Sets whether keyboard repeat is used for player's input.
- Parameters:
-
| repeater | If set to true, a player can hold down a movement key and move in that direction for as long as the key is held down. |
| void Player::setPosition |
( |
ez::Point |
p |
) |
[inline] |
Can set the players position.
- Parameters:
-
| p | The player's position is set to ez::Point p. |
Update function for the player.
Processes player movement, checks to see if he increases a level, and checks to see if player is still alive.
The documentation for this class was generated from the following files:
- C:/Users/D/Documents/Visual Studio 2008/Projects/EZRL_project/EZRLv0.1.9/EZRL/EZRL/player.h
- C:/Users/D/Documents/Visual Studio 2008/Projects/EZRL_project/EZRLv0.1.9/EZRL/EZRL/player.cpp