Abstract high levelcontainer for a single texture. Has methods built-in to deal with movement and camera centering.
More...
#include <BaseSingleTexture.h>
|
|
| 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
|
| |
Abstract high levelcontainer for a single texture. Has methods built-in to deal with movement and camera centering.
◆ centerScreen()
| virtual void BaseSingleTexture::centerScreen |
( |
SDL_Rect & |
camera | ) |
|
|
virtual |
if there is a camera, will center it on the texture
- Parameters
-
◆ 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
-
Implemented in CharacterInMap.
◆ onInput()
| virtual void BaseSingleTexture::onInput |
( |
SDL_Event & |
event | ) |
|
|
inlinevirtual |
processes user input
- Parameters
-
◆ 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: