Unit AI Base Class.
More...
#include <dp88_customAI.h>
- Author
- Daniel Paul (danpa.nosp@m.ul88.nosp@m.@yaho.nosp@m.o.co.nosp@m..uk)
The base class for unit AI classes, this defines some common functions and logic but leaves the specific implementation up to the derived classes
◆ ChooseNewObjective()
◆ GetPreferredAttackRange()
| virtual int dp88_AI_Unit::GetPreferredAttackRange |
( |
GameObject * | obj, |
|
|
GameObject * | target ) |
|
protectedpure virtual |
◆ IsValidTarget()
| virtual bool dp88_AI_Unit::IsValidTarget |
( |
GameObject * | obj, |
|
|
GameObject * | target ) |
|
protectedpure virtual |
◆ ResetAllActions()
| void dp88_AI_Unit::ResetAllActions |
( |
GameObject * | obj | ) |
|
|
protectedvirtual |
Called by derived classes to cancel all ongoing actions, can be overridden in a derived class to reset variable states as necessary
Reimplemented from dp88_customAI.
◆ ShouldPursueTarget()
| bool dp88_AI_Unit::ShouldPursueTarget |
( |
GameObject * | obj, |
|
|
GameObject * | target ) |
|
protectedvirtual |
Used by AttackTarget to decide if the unit should give chase to the target (or, if already within preferred range, hold position) or whether it should continue with its existing pathfinding operation (or, if none, hold position).
The default implementation will return true if the target base priority is >= 0 or there is no current objective to complete, otherwise it will return false
◆ m_bMovingToObjective
| bool dp88_AI_Unit::m_bMovingToObjective |
|
protected |
True if moving towards an objective
◆ m_bMovingToTarget
| bool dp88_AI_Unit::m_bMovingToTarget |
|
protected |
True if moving towards an attack target