Shmup/src/shmup/enemy.h

40 lines
908 B
C++

#ifndef ENEMY_H
#define ENEMY_H
#include <azur/azur.h>
#include <azur/gint/render.h>
#include <cstdint>
#include <stdlib.h>
#include <num/num.h>
#include "bullet.h"
#include "entity.h"
#include "trajectory.h"
class Enemy : public Entity
{
public:
Enemy( int16_t _x, int16_t _y, uint8_t _id );
~Enemy();
virtual void Update( float dt ) override;
virtual void Render( void ) override;
virtual bool Test_Impact( Bullet *projectile ) override;
void Set_Speed_Vector( uint8_t _sp, uint8_t _xd, uint8_t _yd);
virtual void Set_Accumulated_Time( float value );
private:
int8_t dirx, diry; // vector of the current direction of the ennemy (TODO : to implement more complex displacement pattern)
uint32_t lastshottime;
virtual bool Shoot_OK( uint32_t tempshoot, uint8_t shootID );
};
#endif