#ifndef TR_PLAYER_HPP #define TR_PLAYER_HPP #include "utils/player_input.hpp" #include #include #include namespace gd = godot; class Player : public gd::CharacterBody3D { GDCLASS(Player, gd::CharacterBody3D); static void _bind_methods(); public: virtual void _ready() override; virtual void _process(double delta) override; virtual void _physics_process(double delta) override; void _on_dir_horizontal(gd::Ref, float value); void _on_dir_vertical(gd::Ref, float value); gd::Vector2 get_input_directions() const; private: gd::AnimationTree *anim_tree{nullptr}; gd::AnimationNodeStateMachinePlayback *sfm{nullptr}; utils::PlayerInput *input{nullptr}; gd::Node3D *model_node{nullptr}; gd::Vector2 input_directions{}; }; #endif // !TR_PLAYER_HPP