feat: implemented revolver
This commit is contained in:
parent
47970091ff
commit
945baf0994
12 changed files with 12403 additions and 11 deletions
|
|
@ -9,6 +9,7 @@ class Revolver : public WeaponBase {
|
|||
static void _bind_methods();
|
||||
void play_equip_anim();
|
||||
void shoot();
|
||||
void cock_hammer();
|
||||
void on_primary_fire(bool pressed);
|
||||
void on_alt_mode(bool pressed);
|
||||
void ready();
|
||||
|
|
@ -17,14 +18,24 @@ class Revolver : public WeaponBase {
|
|||
protected:
|
||||
void _notification(int what);
|
||||
virtual void notify_selected() override;
|
||||
virtual bool allows_running() const override;
|
||||
|
||||
public:
|
||||
void start_recoil();
|
||||
void set_single_action_spread(float value);
|
||||
float get_single_action_spread() const;
|
||||
void set_double_action_spread(float value);
|
||||
float get_double_action_spread() const;
|
||||
|
||||
private:
|
||||
bool alt_requested{ false };
|
||||
float single_action_spread{ 0.01f };
|
||||
float double_action_spread{ 0.03f };
|
||||
bool alt_active{ false };
|
||||
HitscanMuzzle *muzzle{ nullptr };
|
||||
|
||||
float recoil_force{ 2.f };
|
||||
float recoil_time{ 0.06f };
|
||||
double recoil_time{ 0.06 };
|
||||
double recoil_timer{ 0.0 };
|
||||
};
|
||||
|
||||
#endif // !WEAPONS_REVOLVER_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue