#include <Character.h>
Inheritance diagram for Character:
Public Methods | |
Character () | |
Default constructor. | |
Character (const Rect &initPos, int initDir, int wins) | |
Constructor. | |
virtual | ~Character () |
Destructor. | |
bool | affectMe (const CharacterProps &modprops) |
Applies the affects of the given character properties by adding each property to the character's current properties. | |
void | affectMe (Virus *v) |
Attaches a virus to the character. | |
Virus * | getVirus () const |
Returns the virus currently affecting this player or NULL if there isn't one. | |
void | chargeThrow (float dt) |
Cause the character to start charging to throw a bomb. | |
void | throwBomb () |
Cause the character to throw a bomb. | |
void | move (int dir, float dt) |
Moves the character on the map the given direction. | |
void | noMove (float dt) |
If the move method is not called, this method should be called, when no move is made. | |
void | draw (const Point &anchor) |
Draws the character. | |
bool | update (float dt) |
Update the character's logic and animation. | |
void | resetProps () |
Sets the character's properties to the game default. | |
void | stopAnimation () |
Stops this character's animation. | |
bool | isCharging () const |
Returns true if the chracter is charging up to throw a bomb. | |
void | homingBomb () |
Lays a homing bomb if the character has any available. | |
void | setEnemy (const Character *c) |
Sets the character homing bombs will target. | |
void | decBombCounter () |
Called by ThrownBomb when the bomb explodes. | |
void | decHitPoints () |
Removes one hitpoint from the character. | |
void | drawHUD (const Point &anchor) |
Draws a HUD for this player starting at the specified anchor. | |
virtual float | getHeight () const |
Returns the current height. | |
void | moveBack () |
Moves the character back to its previous position. | |
virtual void | doCollision (Entity *otherEntity) |
Handles the collision between 2 entities by finding what type of entities they are and then handling the different types of collisions;. | |
bool | isDead () const |
Returns true if the character has died. | |
CharacterProps | getProps () const |
Returns this character's props. | |
void | setShrink (bool shrink) |
Shrinks or unshrinks the character. | |
virtual bool | checkCollision (const Entity *otherEntity) |
Returns true if this entity is colliding with the given entity. | |
virtual void | OnLostDevice () |
Event called when device is lost. | |
virtual void | OnResetDevice () |
Event called when device is reset. | |
Static Public Methods | |
void | initVars (ConfigFile &f) |
Initializes and static variables for Character from the ConfigFile. |
|
Default constructor.
|
|
Constructor.
|
|
Destructor.
|
|
Attaches a virus to the character.
|
|
Applies the affects of the given character properties by adding each property to the character's current properties. Returns true if the properties were applied. If after the application any of the properties goes above the limit, false is returned to indicate that the properties were not applied.
|
|
Cause the character to start charging to throw a bomb.
|
|
Returns true if this entity is colliding with the given entity.
Reimplemented from Entity. |
|
Called by ThrownBomb when the bomb explodes. Subtracts from the bomb counter so the player can lay more bombs. |
|
Removes one hitpoint from the character.
|
|
Handles the collision between 2 entities by finding what type of entities they are and then handling the different types of collisions;.
Reimplemented from Entity. |
|
Draws the character. The anchor is the center of the player's feet. Implements Entity. |
|
Draws a HUD for this player starting at the specified anchor.
|
|
Returns the current height.
Reimplemented from Drawable. |
|
Returns this character's props.
|
|
Returns the virus currently affecting this player or NULL if there isn't one.
|
|
Lays a homing bomb if the character has any available.
|
|
Initializes and static variables for Character from the ConfigFile.
|
|
Returns true if the chracter is charging up to throw a bomb.
|
|
Returns true if the character has died.
|
|
Moves the character on the map the given direction.
|
|
Moves the character back to its previous position.
|
|
If the move method is not called, this method should be called, when no move is made. For each logical update of the Character, either move or noMove should be called. Calling both or neither is not allowed.
|
|
Event called when device is lost.
Implements GameDXListener. |
|
Event called when device is reset.
Implements GameDXListener. |
|
Sets the character's properties to the game default.
|
|
Sets the character homing bombs will target.
|
|
Shrinks or unshrinks the character. If the flag is true, then the character will be shrunk, otherwise it will be restored to normal size.
|
|
Stops this character's animation.
|
|
Cause the character to throw a bomb.
|
|
Update the character's logic and animation.
Implements Entity. |