Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
Collider Struct Reference

This struct represents a collider. More...

#include <colliders.h>

Public Attributes

SDL_Rect hitbox
 The hitbox of the collider.
 
CollisionLayer layer
 What layer this object belongs to.
 
CollisionLayer collidesWith
 Bitmask of layers this can collide with.
 
void * owner
 Pointer back to the entity.
 
bool active
 Is this collidable active?
 

Detailed Description

This struct represents a collider.

A collider is a hitbox that can be used to detect collisions between objects. It is used to detect collisions between entities in the game.

Todo:
Add a system to follow/attach colliders to entities.

Member Data Documentation

◆ active

bool Collider::active

Is this collidable active?

◆ collidesWith

CollisionLayer Collider::collidesWith

Bitmask of layers this can collide with.

◆ hitbox

SDL_Rect Collider::hitbox

The hitbox of the collider.

◆ layer

CollisionLayer Collider::layer

What layer this object belongs to.

◆ owner

void* Collider::owner

Pointer back to the entity.


The documentation for this struct was generated from the following file: