DSC Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DSC::Hitbox Class Reference

Rectangular hitbox for 2d entities. More...

#include <hitbox.hpp>

Public Member Functions

 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...
 

Public Attributes

char left
 
char top
 
char width
 
char height
 

Detailed Description

Rectangular hitbox for 2d entities.

Constructor & Destructor Documentation

◆ Hitbox() [1/2]

DSC::Hitbox::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]

DSC::Hitbox::Hitbox ( DSC::ObjSize  size)

creates hitbox component that fits an object size type

Parameters
sizesize of an object that may correspond to the hitbox

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