Shmup/src/shmup/enemy.h

40 lines
908 B
C
Raw Normal View History

#ifndef ENEMY_H
#define ENEMY_H
2023-01-21 14:04:58 +01:00
#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"
2023-01-21 14:04:58 +01:00
class Enemy : public Entity
2023-01-21 14:04:58 +01:00
{
public:
Enemy( int16_t _x, int16_t _y, uint8_t _id );
~Enemy();
2023-01-21 14:04:58 +01:00
virtual void Update( float dt ) override;
virtual void Render( void ) override;
2023-01-21 14:04:58 +01:00
virtual bool Test_Impact( Bullet *projectile ) override;
2023-01-21 14:04:58 +01:00
void Set_Speed_Vector( uint8_t _sp, uint8_t _xd, uint8_t _yd);
virtual void Set_Accumulated_Time( float value );
2023-01-21 14:04:58 +01:00
private:
int8_t dirx, diry; // vector of the current direction of the ennemy (TODO : to implement more complex displacement pattern)
2023-02-05 10:05:05 +01:00
uint32_t lastshottime;
virtual bool Shoot_OK( uint32_t tempshoot, uint8_t shootID );
2023-01-21 14:04:58 +01:00
};
#endif