DSC Engine
Loading...
Searching...
No Matches
hitbox.hpp
Go to the documentation of this file.
1
6#pragma once
8#include "DSCEngine/sprites/obj_size.hpp"
9
10namespace DSC
11{
14 class Hitbox
15 {
16 public:
17 char left;
18 char top;
19 char width;
20 char height;
21
24
31 Hitbox(char left, char top, char width, char height);
32
36 Hitbox(DSC::ObjSize size);
37 } __attribute__((packed));
38}
Rectangular hitbox for 2d entities.
Definition: hitbox.hpp:15
Hitbox()
creates an empty hitbox
Hitbox(char left, char top, char width, char height)
creates a Hitbox instance
Hitbox(DSC::ObjSize size)
creates hitbox component that fits an object size type