aboutsummaryrefslogtreecommitdiffstats
path: root/src/weapon.hpp
blob: 36ac542f389685ab75748ca9c3e576f038a040f5 (plain)
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
44
45
46
47
48
/*********************************/
/*   THRESHOLD        (  //      */
/*   weaponh           ( )/      */
/*   by salade         )(/       */
/*  ________________  ( /)       */
/* ()__)____________)))))   :^}  */
/*********************************/

#ifndef WEAPON_H_
#define WEAPON_H_

#include "raylib.h"

#include <vector>

class Entity;

class AWeapon {
protected:
  Sound shot;
  Sound reload;

  unsigned int max;

  double cooldown;
  double t;


  float const &range;
  unsigned int const &damage;

public:
    AWeapon(float const &rg,
            unsigned int const &dmg,
            unsigned int const & mag,
            double const & cooldown,
            const char *s,
            const char *r);
  ~AWeapon();

  virtual int bang(std::vector<Entity> * enemies, Vector2 playerDirection, Vector2 playerPosition, int * victims) = 0;
  void refill();

  bool empty;
  unsigned int barrel;
};

#endif // WEAPON_H_