diff --git a/player_input.cpp b/player_input.cpp index 5d1ce0e..a4ca823 100644 --- a/player_input.cpp +++ b/player_input.cpp @@ -19,6 +19,9 @@ PlayerInput::Listener::Listener(String positive, String negative, Node *object, , object{object} , isMouseEvent{positive.begins_with("_mouse_") || negative.begins_with("_mouse_")} {} +PlayerInput::Listener::Listener(String action, Node *object, String method) +: PlayerInput::Listener::Listener(action, "", object, method) {} + std::optional PlayerInput::Listener::evaluate_action(String const &action) { Input *input = Input::get_singleton(); if(action.begins_with("_mouse_")) { diff --git a/player_input.hpp b/player_input.hpp index f300746..06f83c8 100644 --- a/player_input.hpp +++ b/player_input.hpp @@ -38,6 +38,7 @@ public: public: Listener(String positive, String negative, Node *object, String method); + Listener(String action, Node *object, String method); // evaluate the current state of an action. static std::optional evaluate_action(String const &action); // check if this event has any chance to result in a trigger, does not evaluate the event or