Shmup/src/boss.h

55 lines
1.1 KiB
C++

#ifndef BOSS_H
#define BOSS_H
#include <azur/azur.h>
#include <azur/gint/render.h>
#include <cstdint>
#include <stdlib.h>
#include <num/num.h>
#include <sys/types.h>
#include "bullet.h"
typedef struct
{
uint8_t P1, P2, P3;
int16_t life;
bool toberemoved;
int color;
} BossPart;
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 lastshoot0 = 0;
uint32_t lastshoot1 = 0;
uint32_t lastshoot2 = 0;
uint8_t rotSpeed;
bool toberemoved;
private:
float rotAngle;
libnum::num radiusInt, radiusExt;
};
#endif