|
Breakout
Breakout
|
A GameObject class. More...
#include <GameObject.hpp>


Public Member Functions | |
| GameObject (int posX, int posY, int width, int height) | |
| Constructs a GameObject. More... | |
| virtual void | Update ()=0 |
| Updates this GameObject. | |
| virtual void | Render (SDL_Renderer *ren)=0 |
| Renders this GameObject. | |
| int | getPosX () const |
| Gets the x position of this GameObject. More... | |
| int | getPosY () const |
| Gets the y position of this GameObject. More... | |
| int | getScaleW () const |
| Gets the total width of this GameObject. More... | |
| int | getScaleH () const |
| Gets the total height of this GameObject. More... | |
| void | Disable () |
| Disables this GameObject. | |
| void | Enable () |
| Enables this GameObject. | |
| bool | IsActive () const |
| Gets whether this GameObject is active. More... | |
Protected Attributes | |
| int | x |
| The x coordinate of the center of this GameObject. | |
| int | y |
| The x coordinate of the center of this GameObject. | |
| int | scaleW |
| The total width of this GameObject. | |
| int | scaleH |
| The total height of this GameObject. | |
| bool | active |
| Whether or not this GameObject is active. | |
A GameObject class.
This represents a simple object within our game, having a position, dimensions, and an active state.
| GameObject::GameObject | ( | int | posX, |
| int | posY, | ||
| int | width, | ||
| int | height | ||
| ) |
Constructs a GameObject.
| posX | The x coordinate of this GameObject |
| posY | The y coordinate of this GameObject |
| width | The width of this GameObject |
| height | The height of this GameObject |
| int GameObject::getPosX | ( | ) | const |
Gets the x position of this GameObject.

| int GameObject::getPosY | ( | ) | const |
Gets the y position of this GameObject.
| int GameObject::getScaleH | ( | ) | const |
Gets the total height of this GameObject.
| int GameObject::getScaleW | ( | ) | const |
Gets the total width of this GameObject.
| bool GameObject::IsActive | ( | ) | const |
Gets whether this GameObject is active.
1.8.14