#ifndef ARTILLERY_TARGET_HPP #define ARTILLERY_TARGET_HPP #include #include #include namespace gd = godot; class ArtilleryTarget : public gd::Node3D { GDCLASS(ArtilleryTarget, gd::Node3D); static void _bind_methods(); public: virtual void _ready() override; void set_effect(gd::Ref scene); gd::Ref get_effect() const; void set_spread(float value); float get_spread() const; void set_frequency_min(float value); float get_frequency_min() const; void set_frequency_max(float value); float get_frequency_max() const; private: void timer_end(); void start_timer(); private: float spread{5.f}; float frequency_min{0.5f}; float frequency_max{2.f}; gd::Ref effect{}; gd::Timer *timer{nullptr}; }; #endif // !ARTILLERY_TARGET_HPP