Shmup/src/shmup/entity.h

39 lines
950 B
C++

#ifndef ENTITY_H
#define ENTITY_H
#include <cstdint>
#include <stdlib.h>
#include <num/num.h>
#include <sys/types.h>
#include "bullet.h"
#include "trajectory.h"
class Entity
{
public:
Entity( int16_t _x, int16_t _y, uint8_t _id );
virtual ~Entity();
virtual void Update( float dt );
virtual void Render( void );
virtual 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;
uint8_t speed; // speed of the boss
int16_t life;
bool toberemoved;
bool hasTrajectory = false;
Trajectory *pathToFollow;
float accumulatedTime;
int16_t life0;
};
#endif