2023-01-13 22:04:30 +01:00
|
|
|
#ifndef GSAI_PURSUE_H
|
|
|
|
#define GSAI_PURSUE_H
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-14 01:43:20 +01:00
|
|
|
#include "core/object/reference.h"
|
|
|
|
|
|
|
|
#include "../gsai_steering_behavior.h"
|
|
|
|
|
|
|
|
class GSAISteeringAgent;
|
|
|
|
class GSAITargetAcceleration;
|
|
|
|
|
2023-01-13 21:13:57 +01:00
|
|
|
class GSAIPursue : public GSAISteeringBehavior {
|
2023-01-13 21:35:07 +01:00
|
|
|
GDCLASS(GSAIPursue, GSAISteeringBehavior);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
public:
|
2023-01-14 01:43:20 +01:00
|
|
|
Ref<GSAISteeringAgent> get_target();
|
|
|
|
void set_target(const Ref<GSAISteeringAgent> &val);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
float get_predict_time_max() const;
|
|
|
|
void set_predict_time_max(const float val);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-14 01:43:20 +01:00
|
|
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
2023-01-14 14:31:39 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
float get_modified_acceleration();
|
2023-01-14 01:43:20 +01:00
|
|
|
virtual float _get_modified_acceleration();
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIPursue();
|
|
|
|
~GSAIPursue();
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-14 01:43:20 +01:00
|
|
|
Ref<GSAISteeringAgent> target;
|
|
|
|
float predict_time_max;
|
2023-01-13 21:13:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|