dEngine
Simple 2D C++ game engine
|
Colliders are used to determine collisions between objects in the world's space. More...
#include <Collider.h>
Private Member Functions | |
Collider (GameObject &associated, Vec2 scale={1, 1}, Vec2 offset={0, 0}) | |
void | Update () override |
Private Attributes | |
SDL_Rect | box |
A rect denoting the collider's position in space. More... | |
Vec2 | scale |
The scale of the collider. More... | |
Vec2 | offset |
The collider's offset from it's parent object. More... | |
Additional Inherited Members | |
![]() | |
Component (GameObject &parent) | |
Create a new component for a gameobject. More... | |
virtual void | NotifyCollision (GameObject &other) |
std::string | GetName () |
Returns the component's name. More... | |
virtual void | Start () |
Start the object To be called by the GameObject's Start method. This should be called at the beginning of instantiation. More... | |
virtual void | Render () |
![]() | |
GameObject & | parent |
std::string | name |
Colliders are used to determine collisions between objects in the world's space.
|
private |
|
overrideprivatevirtual |
Runs every frame performing any required logic
Reimplemented from dengine::Component.
|
private |
A rect denoting the collider's position in space.
Referenced by Update().
|
private |
The collider's offset from it's parent object.