DSC Engine
Loading...
Searching...
No Matches
Classes | Functions | Variables
hitbox.hpp File Reference

Hitbox definitions. More...

#include "DSCEngine/sprites/obj_size.hpp"

Go to the source code of this file.

Classes

class  DSC::Hitbox
 Rectangular hitbox for 2d entities. More...
 

Functions

class DSC::Hitbox DSC::__attribute__ ((packed))
 
 Hitbox ()
 creates an empty hitbox
 
 Hitbox (char left, char top, char width, char height)
 creates a Hitbox instance More...
 
 Hitbox (DSC::ObjSize size)
 creates hitbox component that fits an object size type More...
 

Variables

char left
 
char top
 
char width
 
char height
 

Detailed Description

Hitbox definitions.

Function Documentation

◆ Hitbox() [1/2]

__attribute__::Hitbox ( char  left,
char  top,
char  width,
char  height 
)

creates a Hitbox instance

Parameters
lefthitbox left coordinate
tophitbox top coordinate
widthhitbox width
heighthitbox height

◆ Hitbox() [2/2]

__attribute__::Hitbox ( DSC::ObjSize  size)

creates hitbox component that fits an object size type

Parameters
sizesize of an object that may correspond to the hitbox