#ifndef BONUS_H #define BONUS_H #include #include #include #include #include #include "trajectory.h" class Bonus { public: Bonus( int16_t _x, int16_t _y, uint8_t _id ); ~Bonus(); void Update( float dt ); void Render( void ); libnum::num x, y; // center position of the ennemy uint8_t width, height; // width and height -for the hitbox int16_t xmin, xmax, ymin, ymax; // square hitbox (to speed up the collision calculations) uint8_t ID; uint8_t speed; bool toberemoved; bool hasTrajectory = false; Trajectory *pathToFollow; private: int8_t dirx, diry; libnum::num currentframe; float accumulatedTime; }; #endif