#ifndef PLAYER_H #define PLAYER_H #include #include #include #include #include #include "bullet.h" #include "enemy.h" class Player { public: Player( int16_t _x, int16_t _y, uint8_t _id ); ~Player(); void Update( float dt ); void Render( void ); bool Test_Impact( Bullet *projectile ); bool Test_Impact( Enemy *adverseship ); void Set_Speed( uint8_t _sp ); bool Shoot_OK( uint32_t tempshoot, uint8_t shootID ); void Go_Left( void ); void Go_Right( void ); void Go_Up( void ); void Go_Down( void ); uint16_t x, y; // center position of the player 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; uint8_t speed; // speed of the player uint32_t lastshoot0 = 0; uint32_t lastshoot1 = 0; uint32_t lastshoot2 = 0; bool satellites; uint8_t satLevel; uint8_t satNumber; uint8_t satSpeed; private: float satAngle; uint8_t satRadius; }; #endif