2023-01-13 22:04:30 +01:00
|
|
|
#ifndef GSAI_COHESION_H
|
|
|
|
#define GSAI_COHESION_H
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-14 02:31:42 +01:00
|
|
|
#include "core/object/reference.h"
|
|
|
|
|
|
|
|
#include "../gsai_group_behavior.h"
|
|
|
|
|
|
|
|
class GSAITargetAcceleration;
|
|
|
|
class GSAISteeringAgent;
|
|
|
|
|
2023-01-13 21:13:57 +01:00
|
|
|
class GSAICohesion : public GSAIGroupBehavior {
|
2023-01-13 21:35:07 +01:00
|
|
|
GDCLASS(GSAICohesion, GSAIGroupBehavior);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
public:
|
2023-01-14 02:31:42 +01:00
|
|
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
|
|
|
bool _report_neighbor(Ref<GSAISteeringAgent> neighbor);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAICohesion();
|
|
|
|
~GSAICohesion();
|
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 02:31:42 +01:00
|
|
|
Vector3 _center_of_mass;
|
2023-01-13 21:13:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|