OdinAI

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables
Public Member Functions | Protected Attributes | List of all members
OdinAI::BaseGoal Class Reference

`#include <Goals.h>`

Inheritance diagram for OdinAI::BaseGoal:

## Public Member Functions
virtual void | AddGoal (BaseGoal *goal)
virtual void | Activate ()
virtual int | Process ()
virtual void | End ()
bool | IsActive () const
void | ActivateIfInactive ()
bool | IsComplete () const
bool | HasFailed () const
int | GetStatus () const

## Protected Attributes
int | m_status
| The status of the goal.

## Detailed Description

Abstract class for a AI goal.

## Member Function Documentation

virtual void OdinAI::BaseGoal::Activate | ( |  | ) |
| inline virtual

Function called before a goal is processed.

Reimplemented in OdinAI::CompositeGoal, and OdinAI::AtomicGoal.

void OdinAI::BaseGoal::ActivateIfInactive | ( |  | ) |
| inline

Activate goal if inactive. It will also activate the goal if the status is ready or failed.

virtual void OdinAI::BaseGoal::AddGoal | ( | BaseGoal * | goal | ) |
| inline virtual

Adds a goal to a composite goal. If this function is called on a atomic goal, it will cause an assertion.

Reimplemented in OdinAI::CompositeGoal, and OdinAI::AtomicGoal.

virtual void OdinAI::BaseGoal::End | ( |  | ) |
| inline virtual

Function used to clean up an goal.

Reimplemented in OdinAI::CompositeGoal, and OdinAI::AtomicGoal.

int OdinAI::BaseGoal::GetStatus | ( |  | ) | const
| inline

Returns the status of the goal.

bool OdinAI::BaseGoal::HasFailed | ( |  | ) | const
| inline

Returns true if goal has failed.

bool OdinAI::BaseGoal::IsActive | ( |  | ) | const
| inline

Is goal active?

bool OdinAI::BaseGoal::IsComplete | ( |  | ) | const
| inline

Returns true if goal is complete.

virtual int OdinAI::BaseGoal::Process | ( |  | ) |
| inline virtual

Function used to process an goal.

Reimplemented in OdinAI::CompositeGoal, and OdinAI::AtomicGoal.

The documentation for this class was generated from the following file:

- E:/Development/Projects/OdinAI/Include/OdinAI/Goals.h