Added empty default implementation for Character::onThink.

This commit is contained in:
Felix Ableitner 2012-10-04 19:36:05 +02:00
parent afdd8a03b1
commit 4981af6438
2 changed files with 10 additions and 7 deletions

View file

@ -67,6 +67,15 @@ Character::onDamage(int damage) {
}
}
/**
* Implement this function for any (regular) AI computations. Default implementation does nothing.
*
* @param elapsedTime Amount of time to simulate.
*/
void
Character::onThink(float elapsedTime) {
}
/**
* Called when health reaches zero. Default immplementation does nothing.
*/

View file

@ -32,13 +32,7 @@ public:
// Protected functions.
protected:
/**
* Implement this function for any (regular) AI computations.
*
* @param elapsedTime Amount of time to simulate.
*/
virtual void onThink(float elapsedTime) = 0;
virtual void onThink(float elapsedTime);
virtual void onDeath();
// Private variables.