![]() |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
A rectangle that can be drawn to the screen. More...
#include <rectangleShape.h>


Public Member Functions | |
| virtual void | draw (rune::RenderWindow &window) override |
| The draw call for rendering the shape to the screen. More... | |
| virtual void | start () override |
| Overload of the start method for a rectangle. | |
| RectangleShape (rune::Color newColor=rune::Color::White) | |
| Default constructor that will create a white rectangle by default. More... | |
| void | setFillColor (rune::Color newFillColor) |
| Set the color used to fill the rectangle. More... | |
| rune::Color | getFillColor () |
| Get the color used to fill the rectangle. | |
Public Member Functions inherited from rune::Component | |
| Component ()=default | |
| Default constructor to set up. | |
| virtual void | awake () |
| A function that will be called before all other start functions but after the component has been assigned to a GameObject. | |
| virtual void | update () |
| A function for each component that is called every frame. | |
| virtual void | fixedUpdate () |
| A function for each component that is called once every physics update. | |
| void | setParent (GameObject *newParent) |
| A function to set the pointer to the parent rune::GameObject for each component. More... | |
| void | setEnable (bool newEnable) |
| Enable or disable the component. More... | |
| bool | isComponentEnabled (void) |
| Gets whether or not the current component is enabled. | |
| void | onNotify (Signal const &signal) override |
| A virtual method to be overridden by a concrete implementation of the observer class. | |
Public Attributes | |
| Shader | rectangleShader |
| The shader that should be used to draw this rectangle. | |
Additional Inherited Members | |
Protected Attributes inherited from rune::Component | |
| GameObject * | parentObject = nullptr |
| The rune::GameObject that this component is attached to. If not attached to a rune::GameObject this will equal nullptr. | |
| bool | isEnabled = true |
| Whether or not the component is currently enabled. If not enabled, update function will not be called. | |
A rectangle that can be drawn to the screen.
| rune::RectangleShape::RectangleShape | ( | rune::Color | newColor = rune::Color::White | ) |
Default constructor that will create a white rectangle by default.
| newColor | The color that should be used to draw the rectangle. |
|
overridevirtual |
The draw call for rendering the shape to the screen.
| window | The size of the window that the RectangleShape is being drawn on. |
Implements rune::Drawable.
| void rune::RectangleShape::setFillColor | ( | rune::Color | newColor | ) |
Set the color used to fill the rectangle.
| newColor | the new color that should be used to draw the rectangle. |