//-------------------------- Process ------------------------------------------ //----------------------------------------------------------------------------- int Goal_AttackTarget::Process() { //if status is inactive, call Activate() ActivateIfInactive(); //process the subgoals m_iStatus = ProcessSubgoals(); ReactivateIfFailed(); return m_iStatus; }
//------------------------------ Process -------------------------------------- //----------------------------------------------------------------------------- int Goal_MoveToPosition::Process() { //if status is inactive, call Activate() ActivateIfInactive(); //process the subgoals m_iStatus = ProcessSubgoals(); //if any of the subgoals have failed then this goal re-plans ReactivateIfFailed(); return m_iStatus; }