feat: implemented basics for weapons
This commit is contained in:
parent
6fa9d11af5
commit
aecc40ed6e
15 changed files with 163 additions and 51 deletions
|
|
@ -8,9 +8,16 @@ class PlayerBody;
|
|||
class Rifle : public WeaponBase {
|
||||
GDCLASS(Rifle, WeaponBase);
|
||||
static void _bind_methods();
|
||||
void queue_start_aim();
|
||||
void queue_stop_ads_anim();
|
||||
void queue_start_run_anim();
|
||||
void stop_run_anim();
|
||||
void shoot();
|
||||
void play_equip_anim();
|
||||
void on_primary_fire(bool down);
|
||||
void on_alt_mode(bool alt_mode);
|
||||
void on_animation_changed(String new_anim);
|
||||
void on_run_input(bool run);
|
||||
void ready();
|
||||
void process(double delta);
|
||||
|
||||
|
|
@ -18,12 +25,15 @@ public:
|
|||
void _notification(int what);
|
||||
|
||||
virtual bool allows_running() const override;
|
||||
bool run_requested() const;
|
||||
virtual void notify_selected() override;
|
||||
|
||||
private:
|
||||
float ads_factor{ 0.5f };
|
||||
float run_factor{ 1.5f };
|
||||
bool request_alt_mode{ false };
|
||||
bool in_alt_mode{ false };
|
||||
bool running{ false };
|
||||
};
|
||||
|
||||
#endif // !WEAPONS_RIFLE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue