Building Game Engines
Public Member Functions | List of all members
AIControllerComponent Class Reference

#include <AIControllerComponent.hpp>

Inheritance diagram for AIControllerComponent:
Inheritance graph
Collaboration diagram for AIControllerComponent:
Collaboration graph

Public Member Functions

 AIControllerComponent (TransformComponent *transform)
 
 AIControllerComponent (TransformComponent *transform, int radius, int type)
 
 ~AIControllerComponent ()
 
virtual void Update ()
 
virtual void Render (SDL_Renderer *renderer)
 
int GetType ()
 
std::pair< double, double > GetStartPosition ()
 
int GetRadius ()
 
- Public Member Functions inherited from Component
 Component ()
 
virtual ~Component ()=0
 

Detailed Description

A component to give a game object artificial intelligence

Constructor & Destructor Documentation

◆ AIControllerComponent() [1/2]

AIControllerComponent::AIControllerComponent ( TransformComponent transform)

Default construcor. Transform is to keep track of position.

◆ AIControllerComponent() [2/2]

AIControllerComponent::AIControllerComponent ( TransformComponent transform,
int  radius,
int  type 
)

Constructor that takes in a transform and a radius. Radius is the distance enemies will walk from their current position. Type is what kind of enemy this component represents.

Here is the call graph for this function:

◆ ~AIControllerComponent()

AIControllerComponent::~AIControllerComponent ( )

Destructor.

Member Function Documentation

◆ GetRadius()

int AIControllerComponent::GetRadius ( )

◆ GetStartPosition()

std::pair< double, double > AIControllerComponent::GetStartPosition ( )
Here is the call graph for this function:

◆ GetType()

int AIControllerComponent::GetType ( )

◆ Render()

void AIControllerComponent::Render ( SDL_Renderer *  renderer)
virtual

Empty method. This component does not need to be rendered.

Implements Component.

◆ Update()

void AIControllerComponent::Update ( )
virtual

Performs AI operations, like determining the direction the enemy should move,

Implements Component.

Here is the call graph for this function:

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