-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeapon.h
43 lines (33 loc) · 1 KB
/
Weapon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include "Item.h"
class Weapon :
public Item
{
private:
void initVariables();
protected:
sf::Sprite weapon_sprite;
sf::Texture weapon_texture;
unsigned damageMin;
unsigned damageMax;
unsigned range;
sf::Clock attackTimer;
sf::Int32 attackTimerMax;
public:
Weapon(unsigned level, unsigned value, std::string texture_file);
Weapon(unsigned level,
unsigned damage_min, unsigned damage_max, unsigned range,
unsigned value, std::string texture_file);
virtual ~Weapon();
// Accessors
const unsigned& getDamageMin() const;
const unsigned& getDamageMax() const;
const unsigned getDamage() const;
const unsigned& getRange() const;
const bool getAttackTimer();
virtual void generate(const unsigned levelMin, const unsigned levelMax) = 0;
// Function
virtual Item* clone() = 0;
virtual void update(sf::Vector2f & mouse_pos_view, const sf::Vector2f center) = 0;
virtual void render(sf::RenderTarget& target, sf::Shader* shader = NULL) = 0;
};