#ifndef OBJECTIVE_FLAGS_HPP #define OBJECTIVE_FLAGS_HPP #include "godot_cpp/templates/vector.hpp" #include "godot_cpp/variant/array.hpp" #include #include #include #include namespace gd = godot; class ObjectiveData : public gd::Resource { GDCLASS(ObjectiveData, gd::Resource); static void _bind_methods(); public: bool get_is_completed() const; void set_target_count(int value); int get_target_count() const; void set_completed_count(int value); int get_completed_count() const; void set_sub_objectives_setting(gd::Array array); gd::Array get_sub_objectives_setting() const; private: void check_is_done(); private: int target_count{1}; int completed_count{0}; gd::Vector> sub_objectives{}; }; class ObjectiveFlags : public gd::Node { GDCLASS(ObjectiveFlags, gd::Node); static void _bind_methods(); public: void register_objective(gd::Ref objective_name); gd::Ref get_objective_by_name(); void set_currently_active_objectives(gd::Array array); gd::Array get_currently_active_objectives() const; private: gd::HashSet> currently_active_objectives{}; }; #endif // !OBJECTIVE_FLAGS_HPP