|
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 | |
| 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... | |
Public Member Functions inherited from GameObject | |
| 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) |
| virtual void | Hit (const std::string &tag) |
| GameObject () | |
| default constructor for a gameobject More... | |
Protected Attributes | |
| std::shared_ptr< TextureWrapper > | mTexture |
| internal texture More... | |
| SDL_Rect | mDestination |
| rectangle representing the bounding box More... | |
Protected Attributes inherited from GameObject | |
| 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... | |
Additional Inherited Members | |
Public Attributes inherited from GameObject | |
| 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... | |
Basic renderable GameObject, thin extension of GameObject to handle rendering logic for users.
| GUIElement::GUIElement | ( | const std::shared_ptr< TextureWrapper > & | texture | ) |
Simplest constructure, nameless Element with a texture
| texture | how to render the element |
| GUIElement::GUIElement | ( | const std::shared_ptr< TextureWrapper > & | texture, |
| const std::string & | tag | ||
| ) |
named gui element
| tag | the name, should be unique unless grouping is desired. |
| texture | texture |
| GUIElement::GUIElement | ( | const std::shared_ptr< TextureWrapper > & | texture, |
| const Vector3D & | startPosition | ||
| ) |
More specific constructor that specifies a starting position.
| startPosition | the x,y coordinates of this element. |
| texture | texture |
| GUIElement::GUIElement | ( | const std::shared_ptr< TextureWrapper > & | texture, |
| const Vector3D & | startPosition, | ||
| const std::string & | tag | ||
| ) |
create a named element that has an initial position.
| texture | texture |
| startPosition | startPosition |
| tag | tag |
|
default |
blank GUIElement
| void GUIElement::Render | ( | SDL_Renderer * | renderer | ) |
Render this element to the given renderer.
Solely handles rectangles.
| renderer | the renderer to target. |
|
protected |
rectangle representing the bounding box
|
protected |
internal texture
1.4.1