#ifndef WEAPON_DATA_HPP
#define WEAPON_DATA_HPP

#include <godot_cpp/classes/resource.hpp>
#include <godot_cpp/classes/packed_scene.hpp>
#include <godot_cpp/classes/curve.hpp>

namespace godot {
class WeaponData : public Resource {
    GDCLASS(WeaponData, Resource);
    static void _bind_methods();
public:
    void set_projectile_scene(Ref<PackedScene> scene);
    Ref<PackedScene> get_projectile_scene() const;
    void set_damage(int damage);
    int get_damage() const;
    void set_range(float range);
    float get_range() const;
    void set_projectile_count(int projectile_count);
    int get_projectile_count() const;
    void set_rounds_per_second(float rps);
    float get_rounds_per_second() const;
    void set_allow_automatic(bool allow);
    bool get_allow_automatic() const;
    void set_projectile_speed(Ref<Curve> curve);
    Ref<Curve> get_projectile_speed() const;
private:
    Ref<PackedScene> projectile_scene{};
    int damage{1};
    float range{5.f};
    int projectile_count{1};
    float rounds_per_second{1.f};
    bool allow_automatic{false};
    Ref<Curve> projectile_speed{};
};
}

#endif // !WEAPON_DATA_HPP
