2018-08-09 11:35:52 +02:00
|
|
|
//
|
|
|
|
// Created by Wouter Groeneveld on 09/08/18.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef GBA_SPRITE_ENGINE_PROJECT_BULLET_H
|
|
|
|
#define GBA_SPRITE_ENGINE_PROJECT_BULLET_H
|
|
|
|
|
2018-08-09 18:11:18 +02:00
|
|
|
|
|
|
|
#include <libgba-sprite-engine/sprites/sprite.h>
|
|
|
|
#include <libgba-sprite-engine/gba/tonc_math.h>
|
2018-12-14 19:50:47 +01:00
|
|
|
#include <deque>
|
2018-08-09 18:11:18 +02:00
|
|
|
|
|
|
|
class Bullet {
|
|
|
|
private:
|
|
|
|
std::unique_ptr<Sprite> sprite;
|
2018-12-14 19:50:47 +01:00
|
|
|
std::deque<VECTOR> coords;
|
2018-08-09 18:11:18 +02:00
|
|
|
VECTOR dest;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Bullet(std::unique_ptr<Sprite> sprite) : sprite(std::move(sprite)), dest(VECTOR()) {}
|
|
|
|
|
|
|
|
void tick();
|
2018-12-14 13:11:13 +01:00
|
|
|
void setDestination(VECTOR destination);
|
2018-08-09 18:11:18 +02:00
|
|
|
bool isOffScreen() { return sprite->isOffScreen(); }
|
|
|
|
Sprite* getSprite() { return sprite.get(); }
|
2018-08-09 11:35:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //GBA_SPRITE_ENGINE_PROJECT_BULLET_H
|