Shmup/src/shmup/bonus.h

43 lines
874 B
C++

#ifndef BONUS_H
#define BONUS_H
#include <azur/azur.h>
#include <azur/gint/render.h>
#include <cstdint>
#include <stdlib.h>
#include <num/num.h>
#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