ICT290 / src / scene / AIController / Goals / GoalWander.cpp
GoalWander.cpp
Raw
#include "GoalWander.h"

//---------------------------- Initialize -------------------------------------
//-----------------------------------------------------------------------------
void GoalWander::Activate() {
    m_Status = active;
    markOwnerWithGoal();
    m_Owner->getSteering()->WanderOn();
}

//------------------------------ Process --------------------------------------
//-----------------------------------------------------------------------------
int GoalWander::Process() {
    // if status is inactive, call Activate()
    activateIfInactive();

    return m_Status;
}

//---------------------------- Terminate --------------------------------------
//-----------------------------------------------------------------------------
void GoalWander::Terminate() {
    m_Owner->getSteering()->WanderOff();
}