26 lines
495 B
C++
26 lines
495 B
C++
#ifndef ENEMY_H
|
|
#define ENEMY_H
|
|
|
|
#include "Actor.h"
|
|
#include "SFML/System/Clock.hpp"
|
|
|
|
class Enemy : public Actor {
|
|
public:
|
|
Enemy(int x, int y, std::string path);
|
|
|
|
void shoot() override;
|
|
void move(float deltaX, float deltaY) override;
|
|
void moveLeft() override;
|
|
void moveRight() override;
|
|
void moveUp() override;
|
|
void moveDown() override;
|
|
bool isAlive() const;
|
|
void takeDamage();
|
|
|
|
private:
|
|
sf::Clock shootClock;
|
|
bool alive = true;
|
|
};
|
|
|
|
#endif // ENEMY_H
|