#ifndef BOSS_H #define BOSS_H #include #include #include #include #include #include #include "bullet.h" #include "trajectory.h" typedef struct { uint8_t P1, P2, P3; int16_t life; bool toberemoved; int color; } BossPart; typedef struct { int16_t life; bool toberemoved; } BossGun; class Boss { public: Boss( int16_t _x, int16_t _y, uint8_t _id ); ~Boss(); void Update( float dt ); void Render( void ); bool Test_Impact( Bullet *projectile ); libnum::num x, y; // center position of the boss uint8_t width, height; // width and height -for the hitbox int16_t xmin, xmax, ymin, ymax; // square hitbox (to speed up the bullet impact calculations) uint8_t ID; int16_t life, life0; uint8_t speed; // speed of the boss uint32_t lastshoot = 0; uint8_t rotSpeed; bool toberemoved; bool hasTrajectory = false; Trajectory *pathToFollow; private: float rotAngle; libnum::num radiusInt, radiusExt; uint32_t lastshoot0 = 0; uint32_t lastshoot1 = 0; float accumulatedTime; bool Shoot_OK( uint32_t tempshoot, uint8_t shootID ); }; #endif