|
SPARK
0.1.0
A general purpose game engine written in C++.
|
A square collider that moves and checks for collisions with other colliders. More...
#include <Collider.h>
Public Member Functions | |
| DynamicCollider (GameObject *parent) | |
| DynamicCollider (GameObject *parent, math::Rectangle< float > rectangle) | |
| void | onUpdate (float) override |
| Method called on every frame. | |
Public Member Functions inherited from spark::core::components::Collider | |
| math::Vector4< float > | bounds () const |
| Gets the bounds of the rectangle in screen space. | |
| bool | collidesWith (const Collider &other) const |
| Checks if the collider is colliding with another collider. | |
Public Member Functions inherited from spark::core::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 | render () const |
| Renders the component. | |
| virtual void | onAttach () |
| Method called when the component is attached to a GameObject. | |
| virtual void | onDetach () |
| Method called when the component is detached from a GameObject. | |
Public Member Functions inherited from spark::rtti::HasRtti | |
| 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 | |
| patterns::Signal< const Collider & > | onCollision |
| Signal emitted when a collision is detected. | |
Additional Inherited Members | |
Protected Member Functions inherited from spark::core::components::Collider | |
| Collider (GameObject *parent, math::Rectangle< float > rectangle) | |
A square collider that moves and checks for collisions with other colliders.
|
inlineoverridevirtual |
Method called on every frame.
| dt | The time in seconds since the last frame. |
Reimplemented from spark::core::Component.