vectozavr-shooter/weapon/Ak47.cpp

18 lines
557 B
C++
Raw Normal View History

2021-09-13 15:53:43 +03:00
//
// Created by Иван Ильин on 02.06.2021.
//
2021-10-09 13:41:12 +03:00
#include "../engine/ResourceManager.h"
2021-09-13 15:53:43 +03:00
#include "Ak47.h"
using namespace std;
Ak47::Ak47(int ammo, const std::string& weaponName) : Weapon(weaponName, "obj/ak47.obj", "obj/ak47_mat.txt", Vec3D{3, 3, 3}, Vec3D{-0.8, 1.3, 0.3}, Vec3D{0, Consts::PI, 0}) {
2021-10-09 13:41:12 +03:00
fireSound.setBuffer(*ResourceManager::loadSoundBuffer("sound/weapons/ak47.ogg"));
reloadSound.setBuffer(*ResourceManager::loadSoundBuffer("sound/weapons/reload_ak47.ogg"));
2021-09-13 15:53:43 +03:00
_stockAmmo = ammo - _clipCapacity;
_fireDelay = 0.1;
}