aboutsummaryrefslogtreecommitdiffstats
path: root/src/weapon.cpp
blob: f357b405558614334e830feffba78a314e130786 (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
/*********************************/
/*   THRESHOLD        (  //      */
/*   weapon            ( )/      */
/*   by salade         )(/       */
/*  ________________  ( /)       */
/* ()__)____________)))))   :^}  */
/*********************************/

#include "weapon.hpp"

#include <iostream>

AWeapon::AWeapon(float const & rg, unsigned int const & dmg, unsigned int const & mag, const char *s, const char *r) :
    range(rg), damage(dmg), max(mag)
{
    InitAudioDevice();
    shot = LoadSound(s);
    reload = LoadSound(r);
    SetSoundVolume(shot, 0.3f);
    SetSoundVolume(reload, 0.3f);
    barrel = max;
}

AWeapon::~AWeapon() {}

void AWeapon::refill()
{
    std::cout << "reload" << std::endl;
    PlaySound(reload);
    barrel = max;
}