Archimedes/Dash Da Capo!
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BaseSingleTexture Class Referenceabstract

Abstract high levelcontainer for a single texture. Has methods built-in to deal with movement and camera centering. More...

#include <BaseSingleTexture.h>

Inheritance diagram for BaseSingleTexture:
CharacterInMap

Public Member Functions

 BaseSingleTexture (int mainVelocity, int velocityX, int velocityY, SDL_Rect collisionBox)
 
virtual void onInput (SDL_Event &event)
 processes user input
 
virtual void move (int xBoundary, int yBoundary)=0
 updates the textures position
 
virtual void centerScreen (SDL_Rect &camera)
 if there is a camera, will center it on the texture
 
virtual void render (SDL_Renderer *renderer, const SDL_Rect &camera, TextureWrapper &debugControllerTexture)=0
 renders the texture
 
SDL_Rect getCollisionBox () const
 returns the collisionBox
 

Detailed Description

Abstract high levelcontainer for a single texture. Has methods built-in to deal with movement and camera centering.

Member Function Documentation

◆ centerScreen()

virtual void BaseSingleTexture::centerScreen ( SDL_Rect &  camera)
virtual

if there is a camera, will center it on the texture

Parameters
camera

◆ getCollisionBox()

SDL_Rect BaseSingleTexture::getCollisionBox ( ) const

returns the collisionBox

Returns

◆ move()

virtual void BaseSingleTexture::move ( int  xBoundary,
int  yBoundary 
)
pure virtual

updates the textures position

Parameters
xBoundary
yBoundary

Implemented in CharacterInMap.

◆ onInput()

virtual void BaseSingleTexture::onInput ( SDL_Event &  event)
inlinevirtual

processes user input

Parameters
event

◆ render()

virtual void BaseSingleTexture::render ( SDL_Renderer *  renderer,
const SDL_Rect &  camera,
TextureWrapper debugControllerTexture 
)
pure virtual

renders the texture

Parameters
renderer
camera
debugControllerTexture

Implemented in CharacterInMap.


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