27 lines
483 B
C++
27 lines
483 B
C++
#include <iostream>
|
|
#include <SFML/Graphics.hpp>
|
|
#include <SFML/Audio.hpp>
|
|
|
|
using namespace std;
|
|
|
|
#ifndef ENEMY_H
|
|
#define ENEMY_H
|
|
|
|
class Enemy {
|
|
sf::Texture enemyTexture;
|
|
sf::Sprite enemySprite;
|
|
sf::SoundBuffer attackSoundBuffer;
|
|
sf::Sound attackSound;
|
|
|
|
public:
|
|
int energy;
|
|
Enemy(int);
|
|
|
|
bool performSetup();
|
|
bool checkIfHit(sf::Vector2i);
|
|
bool takeDamage(int);
|
|
void draw(sf::RenderWindow *);
|
|
};
|
|
|
|
#endif
|