OdinAI
 All Classes Namespaces Functions Variables
OdinAI::BaseGoal Class Reference

#include <Goals.h>

Inheritance diagram for OdinAI::BaseGoal:
OdinAI::AtomicGoal OdinAI::CompositeGoal

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 ( )
inlinevirtual

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)
inlinevirtual

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 ( )
inlinevirtual

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 ( )
inlinevirtual

Function used to process an goal.

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


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