diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-04-18 07:21:29 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 07:21:29 -0300 |
commit | 1a3688d0cc13d1734977a36773666eb8e2f004ad (patch) | |
tree | 542a21c59b18f62595e886b9ed976b50f280573c /main/input_default.h | |
parent | 59b816679e1c87d17ec48bfb5677fb9ff8a9ce5d (diff) | |
parent | ebfa731012e854d26d800b5abd56745cf9935098 (diff) |
Merge pull request #16902 from groud/analog_action_system
Allow actions to provide an analog value
Diffstat (limited to 'main/input_default.h')
-rw-r--r-- | main/input_default.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/input_default.h b/main/input_default.h index 384b04cf41..6dd88cd31e 100644 --- a/main/input_default.h +++ b/main/input_default.h @@ -55,6 +55,7 @@ class InputDefault : public Input { uint64_t physics_frame; uint64_t idle_frame; bool pressed; + float strength; }; Map<StringName, Action> action_state; @@ -182,6 +183,7 @@ public: virtual bool is_action_pressed(const StringName &p_action) const; virtual bool is_action_just_pressed(const StringName &p_action) const; virtual bool is_action_just_released(const StringName &p_action) const; + virtual float get_action_strength(const StringName &p_action) const; virtual float get_joy_axis(int p_device, int p_axis) const; String get_joy_name(int p_idx); |