Game Engine 2D Platformer
Public Member Functions | List of all members
AIGraphicsComponent Class Reference

GraphicsComponent class used to flip through frames for a GameEntity. More...

#include <AIGraphicsComponent.hpp>

Inheritance diagram for AIGraphicsComponent:
Inheritance graph
[legend]
Collaboration diagram for AIGraphicsComponent:
Collaboration graph
[legend]

Public Member Functions

 AIGraphicsComponent (SDL_Renderer *ren)
 Constructor of AIGraphicsComponent. More...
 
 ~AIGraphicsComponent ()
 Destructor of AIGraphicsComponent. More...
 
void StartUp ()
 StartUp function to Initialize attributes of AIGraphicsComponent. More...
 
void ShutDown ()
 Shutdown function to destroy and free attributes of AIGraphicsComponent. More...
 
void Update (GameEntity &entity)
 Updates the attributes of AIGraphicsComponent. More...
 
void Render (GameEntity &entity)
 Helps Render the AI Entity of AIGraphicsComponent. More...
 
void LoadImage (std::string filepath, SDL_Renderer *ren)
 Loads image to use for graphics. More...
 
- Public Member Functions inherited from Component
 Component ()=default
 Constuctor for Component class. More...
 
virtual void HandleEvent (GameEntity &entity)
 Handle the events of GameEntity object for children classes. More...
 

Detailed Description

GraphicsComponent class used to flip through frames for a GameEntity.

Constructor & Destructor Documentation

◆ AIGraphicsComponent()

AIGraphicsComponent::AIGraphicsComponent ( SDL_Renderer *  ren)

Constructor of AIGraphicsComponent.

Parameters
renThe Renderer of the main Game Loop

◆ ~AIGraphicsComponent()

AIGraphicsComponent::~AIGraphicsComponent ( )

Destructor of AIGraphicsComponent.

Member Function Documentation

◆ LoadImage()

void AIGraphicsComponent::LoadImage ( std::string  filepath,
SDL_Renderer *  ren 
)
virtual

Loads image to use for graphics.

Loads image to use for graphics and uses ResourceManager.

Parameters
std::stringfilepath
SDL_Rendererren

Reimplemented from Component.

◆ Render()

void AIGraphicsComponent::Render ( GameEntity entity)
virtual

Helps Render the AI Entity of AIGraphicsComponent.

Renders graphic.

Parameters
entityGameEntity Object
GameEntity&entity

Reimplemented from Component.

◆ ShutDown()

void AIGraphicsComponent::ShutDown ( )
virtual

Shutdown function to destroy and free attributes of AIGraphicsComponent.

Reimplemented from Component.

◆ StartUp()

void AIGraphicsComponent::StartUp ( )
virtual

StartUp function to Initialize attributes of AIGraphicsComponent.

Reimplemented from Component.

◆ Update()

void AIGraphicsComponent::Update ( GameEntity entity)
virtual

Updates the attributes of AIGraphicsComponent.

Selects graphic to render depending on frame.

Parameters
entityGameEntity Object
GameEntity&entity

Implements Component.


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