Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
rune::RectangleShape Class Reference

A rectangle that can be drawn to the screen. More...

#include <rectangleShape.h>

Inheritance diagram for rune::RectangleShape:
Collaboration diagram for rune::RectangleShape:

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
GameObjectparentObject = 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.
 

Detailed Description

A rectangle that can be drawn to the screen.

Author
Thomas Montano
Date
April 25 2020

Constructor & Destructor Documentation

◆ RectangleShape()

rune::RectangleShape::RectangleShape ( rune::Color  newColor = rune::Color::White)

Default constructor that will create a white rectangle by default.

Parameters
newColorThe color that should be used to draw the rectangle.

Member Function Documentation

◆ draw()

void rune::RectangleShape::draw ( rune::RenderWindow window)
overridevirtual

The draw call for rendering the shape to the screen.

Parameters
windowThe size of the window that the RectangleShape is being drawn on.

Implements rune::Drawable.

◆ setFillColor()

void rune::RectangleShape::setFillColor ( rune::Color  newColor)

Set the color used to fill the rectangle.

Parameters
newColorthe new color that should be used to draw the rectangle.

The documentation for this class was generated from the following files: