#include <MVFirefly.h>

Public Member Functions | |
| MVFirefly () | |
| MVFirefly (MVBoard *board, Uint32 x, Uint32 y) | |
| Default constructor. | |
| ~MVFirefly () | |
| Destructor. | |
| void | addToPocket (MVMaterial *object) |
| Adds an OnPlaceObject to the firefly's pocket. | |
| void | removeFromPocket (MVMaterial *object) |
| Removes an OnPlaceObject from the firefly's pocket. | |
| std::vector< MVMaterial * > * | getPocket () |
| Returns a pointer to the list of objects in the firefly's pocket. | |
| Vector | move (const Vector &movement, Uint32 timeDif) |
| Moves the firefly with collision detection. | |
| void | setX (int x) |
| Set new value for x-position. (should only be called by MVBoard). | |
| void | setY (int y) |
| Set new value for y-position. (should only be called by MVBoard). | |
| void | setWater (GLfloat water) |
| Setter for water. | |
| GLfloat | getWater () |
| Gettter for water. | |
| void | setFood (GLfloat food) |
| Setter for food. | |
| GLfloat | getFood () |
| Gettter for food. | |
| void | setScore (Uint32 score) |
| Setter for score. | |
| void | setMaxScore (Uint32 maxScore) |
| Setter for maxScore. | |
| Uint32 | getScore () |
| Getter for score. | |
| Uint32 | getMaxScore () |
| Getter for maxScore. | |
| Vector | getRealWorldCoordinates () |
| Vector for camera alignment. | |
| void | renderGl () |
| Do the drawing stuff. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Private Attributes | |
| std::vector< MVMaterial * > | |
| Vector of things in the firefly's pocket. | |
| ParticleSystem | glow |
| Aura around firefly. | |
| GLfloat | water |
| Indicates strength of the firefly. | |
| GLfloat | food |
| Indicates strength of the firefly. | |
| bool | live |
| Tells us if Firefly is dead. | |
| Uint32 | score |
| Value firefly has collected so far. | |
| Uint32 | maxScore |
| Value firefly must achieve to win. | |
| MVBoard * | board |
| Firefly's world. | |
| Uint32 | xStartBoard |
| Firefly's surroundings x-start. | |
| Uint32 | xEndBoard |
| Firefly's surroundings x-start. | |
| Uint32 | yStartBoard |
| Firefly's surroundings x-start. | |
| Uint32 | yEndBoard |
| Firefly's surroundings x-start. | |
| Uint32 | xOriginal |
| Where was the firefly spawned? x-coord. | |
| Uint32 | yOriginal |
| Where was the firefly spawned? y-coord. | |
| MVFirefly::MVFirefly | ( | ) |
| MVFirefly::MVFirefly | ( | MVBoard * | board, | |
| Uint32 | x, | |||
| Uint32 | y | |||
| ) |
Default constructor.
Default constructor.
| MVFirefly::~MVFirefly | ( | ) |
Destructor.
| void MVFirefly::addToPocket | ( | MVMaterial * | object | ) |
Adds an OnPlaceObject to the firefly's pocket.
Adds an OnPlaceObject to the firefly's pocket.
| object | Pointer to the object, instance of MVOnPlaceObject, which should be added. |
| void MVFirefly::removeFromPocket | ( | MVMaterial * | object | ) |
Removes an OnPlaceObject from the firefly's pocket.
Removes an OnPlaceObject from the firefly's pocket.
| object | Pointer to the object, instance of MVOnPlaceObject, which should be removed. |
| std::vector< MVMaterial * > * MVFirefly::getPocket | ( | ) |
Returns a pointer to the list of objects in the firefly's pocket.
Moves the firefly with collision detection.
Very primitive and ineffective collision detection
| movement | Where you would like to go |
| void MVFirefly::setX | ( | int | x | ) |
| void MVFirefly::setY | ( | int | y | ) |
| void MVFirefly::setWater | ( | GLfloat | water | ) |
Setter for water.
| water | the new water reserves for Firefly |
| GLfloat MVFirefly::getWater | ( | ) |
Gettter for water.
| void MVFirefly::setFood | ( | GLfloat | food | ) |
Setter for food.
| water | the new food reserves for Firefly |
| GLfloat MVFirefly::getFood | ( | ) |
Gettter for food.
| void MVFirefly::setScore | ( | Uint32 | score | ) |
Setter for score.
| score | the new score |
| void MVFirefly::setMaxScore | ( | Uint32 | maxScore | ) |
Setter for maxScore.
| maxScore | the new max score |
| Uint32 MVFirefly::getScore | ( | ) |
Getter for score.
| Uint32 MVFirefly::getMaxScore | ( | ) |
Getter for maxScore.
| void MVFirefly::renderGl | ( | ) | [virtual] |
| string MVFirefly::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from MVMovingOnPlaceObject.
| string MVFirefly::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from MVMovingOnPlaceObject.
| enum classId MVFirefly::classId | ( | ) | const [virtual] |
Returns the class id of the object.
Reimplemented from MVMovingOnPlaceObject.
std::vector<MVMaterial*> MVFirefly::pocket [private] |
Vector of things in the firefly's pocket.
ParticleSystem MVFirefly::glow [private] |
Aura around firefly.
GLfloat MVFirefly::water [private] |
Indicates strength of the firefly.
GLfloat MVFirefly::food [private] |
Indicates strength of the firefly.
bool MVFirefly::live [private] |
Tells us if Firefly is dead.
Uint32 MVFirefly::score [private] |
Value firefly has collected so far.
Uint32 MVFirefly::maxScore [private] |
Value firefly must achieve to win.
MVBoard* MVFirefly::board [private] |
Firefly's world.
Uint32 MVFirefly::xStartBoard [private] |
Firefly's surroundings x-start.
Uint32 MVFirefly::xEndBoard [private] |
Firefly's surroundings x-start.
Uint32 MVFirefly::yStartBoard [private] |
Firefly's surroundings x-start.
Uint32 MVFirefly::yEndBoard [private] |
Firefly's surroundings x-start.
Uint32 MVFirefly::xOriginal [private] |
Where was the firefly spawned? x-coord.
Uint32 MVFirefly::yOriginal [private] |
Where was the firefly spawned? y-coord.
1.5.6