#include <PlayerCreature.h>
|
| PlayerCreature (double x=0.0, double y=0.0, double width=1.0, double height=1.0, Uint8 health=3) |
|
| ~PlayerCreature () |
|
void | onCollision (SolidObject *collider) override |
|
Uint32 | getCoins () const |
|
| Creature (double x=0.0, double y=0.0, double width=1.0, double height=1.0, Uint8 health=1) |
|
virtual | ~Creature () |
|
void | savePrevious () override |
|
void | moveBy (double x, double y) |
|
void | hurt (Sint8 damage) |
|
void | setSpeedVector (double x, double y) |
|
void | addCollisionState (CollisionState state) |
|
Uint8 | getHealth () const |
|
bool | getIsAlive () const |
|
bool | getIsInvulnerable () const |
|
bool | getWasInvulnerable () const |
|
double | getSpeedX () const |
|
double | getSpeedY () const |
|
CollisionState | getCollisionState () const |
|
Creature & | operator= (Creature const &)=delete |
|
| SolidObject (double x=0.0, double y=0.0, double width=1.0, double height=1.0) |
|
virtual | ~SolidObject () |
|
| Object (double x=0.0, double y=0.0, double width=1.0, double height=1.0) |
|
virtual | ~Object () |
|
void | destroy () |
|
double | getY () const |
|
double | getX () const |
|
double | getWidth () const |
|
double | getHeight () const |
|
double | getPrevX () const |
|
double | getPrevY () const |
|
bool | getDestroyed () const |
|
PlayerCreature is a Creature that should be controlled by Player. It derives from Creature.
- See also
- Creature
PlayerCreature::PlayerCreature |
( |
double |
x = 0.0 , |
|
|
double |
y = 0.0 , |
|
|
double |
width = 1.0 , |
|
|
double |
height = 1.0 , |
|
|
Uint8 |
health = 3 |
|
) |
| |
PlayerCreature::~PlayerCreature |
( |
| ) |
|
Uint32 PlayerCreature::getCoins |
( |
| ) |
const |
Get number of collected coins.
- Returns
- Uint32
void PlayerCreature::onCollision |
( |
SolidObject * |
collider | ) |
|
|
overridevirtual |
Function for resolving special cases of collision. If special case is not found, function calls Creature implementation of onCollision.
- Parameters
-
- Returns
- void
Reimplemented from Creature.
The documentation for this class was generated from the following files:
- C:/Users/Michał/Desktop/forest_mldp/Projekt/trunk/PlayerCreature.h
- C:/Users/Michał/Desktop/forest_mldp/Projekt/trunk/PlayerCreature.cpp