2021-09-13 15:53:43 +03:00
|
|
|
//
|
|
|
|
// Created by Иван Ильин on 06.06.2021.
|
|
|
|
//
|
|
|
|
|
2021-10-09 13:41:12 +03:00
|
|
|
#include "../engine/ResourceManager.h"
|
2021-09-13 15:53:43 +03:00
|
|
|
#include "Rifle.h"
|
2021-10-16 20:22:55 +03:00
|
|
|
#include "../ShooterConsts.h"
|
2021-09-13 15:53:43 +03:00
|
|
|
|
2021-10-22 19:42:32 +03:00
|
|
|
Rifle::Rifle(int ammo, const std::string &weaponName) : Weapon(weaponName, ShooterConsts::RIFLE_OBJ, Vec3D{3, 3, 3}, Vec3D{-2.3, 1, 1.3}, Vec3D{0, Consts::PI, 0}) {
|
2021-10-17 19:38:16 +03:00
|
|
|
fireSound = ShooterConsts::RIFLE_FIRE_SOUND;
|
|
|
|
reloadSound = ShooterConsts::RIFLE_RELOAD_SOUND;
|
2021-09-13 15:53:43 +03:00
|
|
|
|
|
|
|
_initialPack = 5;
|
|
|
|
_clipCapacity = 1; // how much ammo can be stored in one clip
|
|
|
|
_stockAmmo = ammo - _clipCapacity; // how much ammo do you have in stock
|
|
|
|
_clipAmmo = _clipCapacity; // how much ammo do you have in current clip
|
|
|
|
_reloadTime = 1;
|
|
|
|
_fireDelay = 1; // time delay between fires
|
|
|
|
_damage = 30000;
|
|
|
|
_spreading = 0.5;
|
|
|
|
}
|