SPARK
0.1.0
A general purpose game engine written in C++.
|
A simple component to render a circle. More...
#include <Circle.h>
Public Member Functions | |
Circle (GameObject *parent) | |
Creates a new circle component . Defaults to a radius of 25. | |
Circle (GameObject *parent, const float radius) | |
Creates a new circle component . | |
void | render () const override |
Renders the component. | |
![]() | |
Component (GameObject *parent) | |
Instantiates a new Component. | |
Component (const Component &other)=delete | |
Component (Component &&other) noexcept=default | |
Component & | operator= (const Component &other)=delete |
Component & | operator= (Component &&other) noexcept=default |
const lib::Uuid & | uuid () const |
Gets the UUID of the component. | |
GameObject * | gameObject () |
Gets the GameObject that the component is attached to. | |
const GameObject * | gameObject () const |
Gets the GameObject that the component is attached to. | |
virtual void | onAttach () |
Method called when the component is attached to a GameObject. | |
virtual void | onUpdate (float dt) |
Method called on every frame. | |
virtual void | onDetach () |
Method called when the component is detached from a GameObject. | |
![]() | |
HasRtti (const HasRtti &other)=default | |
HasRtti (HasRtti &&other) noexcept=default | |
HasRtti & | operator= (const HasRtti &other)=default |
HasRtti & | operator= (HasRtti &&other) noexcept=default |
virtual RttiBase & | rttiInstance () const =0 |
Public Attributes | |
float | radius = 25 |
A simple component to render a circle.
|
inlineexplicit |
Creates a new circle component . Defaults to a radius of 25.
parent | The parent game object. |
|
inlineexplicit |
Creates a new circle component .
radius | The radius of the circle. (in pixels) |
parent | The parent game object. |
|
inlineoverridevirtual |
Renders the component.
Reimplemented from spark::core::Component.