Added empty default implementation for Character::onThink.
This commit is contained in:
parent
afdd8a03b1
commit
4981af6438
2 changed files with 10 additions and 7 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
|
|
Reference in a new issue