SDL Breakout Engine
0.1.0
An implementation of a Breakout game using sdl, implemented with efficient resource management.
|
#include <GameObject.hpp>
Public Member Functions | |
Brick (const std::shared_ptr< TextureWrapper > &texture, const std::string &tag) | |
void | Hit (const std::string &tag) |
![]() | |
GUIElement (const std::shared_ptr< TextureWrapper > &texture) | |
GUIElement (const std::shared_ptr< TextureWrapper > &texture, const std::string &tag) | |
GUIElement (const std::shared_ptr< TextureWrapper > &texture, const Vector3D &startPosition) | |
GUIElement (const std::shared_ptr< TextureWrapper > &texture, const Vector3D &startPosition, const std::string &tag) | |
void | Render (SDL_Renderer *renderer) |
GUIElement () | |
blank GUIElement More... | |
![]() | |
GameObject (const std::string &tag) | |
GameObject (const Vector3D &position) | |
GameObject (const Vector3D &position, const std::string &tag) | |
GameObject (const Vector3D &position, const Vector3D &size) | |
GameObject (const Vector3D &position, const Vector3D &size, const std::string &tag) | |
void | Update (const Vector3D &position) |
Vector3D | GetSize () |
Vector3D | GetSize () const |
const Vector3D & | _GetPosition () const |
void | DebugRender (SDL_Renderer *renderer) |
GameObject () | |
default constructor for a gameobject More... | |
Additional Inherited Members | |
![]() | |
std::string | mTag = "" |
the name of this object, should be unique to other objects unless grouping is desired. More... | |
bool | alive = true |
whether this object is alive or not. More... | |
![]() | |
std::shared_ptr< TextureWrapper > | mTexture |
internal texture More... | |
SDL_Rect | mDestination |
rectangle representing the bounding box More... | |
![]() | |
int | mWidth = 0 |
internal width More... | |
int | mHeight = 0 |
internal height More... | |
Vector3D | mPosition = Vector3D(0, 0, 0) |
internal position More... | |
Vector3D | startPosition |
start position More... | |
Simple GUIELement that handles collision with a 'ball' GameObject.
Brick::Brick | ( | const std::shared_ptr< TextureWrapper > & | texture, |
const std::string & | tag | ||
) |
Create a brick with a desired texture and name.
texture | how the brick looks |
tag | the name of the brick element |
|
virtual |
Defines functionality for when this brick gets hit.
tag | what hit it. |
Reimplemented from GameObject.