Exemplo n.º 1
0
//------------------------------ Process -------------------------------------
//-----------------------------------------------------------------------------
int Goal_InstallBomb::Process()
{
	//if status is inactive, call Activate()
	ActivateIfInactive();

	//process the subgoals
	m_iStatus = ProcessSubgoals();

	return m_iStatus;
}
Exemplo n.º 2
0
//------------------------------ Process --------------------------------------
//-----------------------------------------------------------------------------
int Goal_NegotiateDoor::Process()
{
  //if status is inactive, call Activate()
  ActivateIfInactive();

  //process the subgoals
  m_iStatus = ProcessSubgoals();

  return m_iStatus;
}
Exemplo n.º 3
0
//-------------------------- 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;
}
Exemplo n.º 5
0
		int GoalFollowPath::Process(const UpdateArgs& args)
		{
			// if status is inactive, call Activate()
			ActivateIfInactive(args);

			status = ProcessSubgoals(args);

			//if there are no subgoals present check to see if the path still has edges.
			//remaining. If it does then call activate to grab the next edge.
			if (status == Completed && !path.empty())
				Activate(args);

			return status;
		}
//------------------------------ Process --------------------------------------
//-----------------------------------------------------------------------------
int Goal_HuntTarget::Process()
{
  //if status is inactive, call Activate()
  ActivateIfInactive();

  m_iStatus = ProcessSubgoals();

  //if target is in view this goal is satisfied
  if (m_pOwner->GetTargetSys()->isTargetWithinFOV())
  {
     m_iStatus = completed;
  }

  return m_iStatus;
}
//-------------------------- Process ------------------------------------------
//-----------------------------------------------------------------------------
int Goal_FollowPath::Process()
{
  //if status is inactive, call Activate()
  ActivateIfInactive();

  m_iStatus = ProcessSubgoals();

  //if there are no subgoals present check to see if the path still has edges.
  //remaining. If it does then call activate to grab the next edge.
  if (m_iStatus == completed && !m_Path.empty())
  {
    Activate(); 
  }

  return m_iStatus;
}
//-------------------------- Process ------------------------------------------
//-----------------------------------------------------------------------------
int Goal_GetItem::Process()
{
  ActivateIfInactive();

  if (hasItemBeenStolen())
  {
    Terminate();
  }

  else
  {
    //process the subgoals
    m_iStatus = ProcessSubgoals();
  }

  return m_iStatus;
}