2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:29:17 +01:00
|
|
|
#include "gsai_utils.h"
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:59:21 +01:00
|
|
|
GSAIUtils *GSAIUtils::_singleton = NULL;
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIUtils::GSAIUtils() {
|
2023-01-13 21:59:21 +01:00
|
|
|
_singleton = this;
|
2023-01-13 21:35:07 +01:00
|
|
|
}
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIUtils::~GSAIUtils() {
|
2023-01-13 21:59:21 +01:00
|
|
|
_singleton = NULL;
|
2023-01-13 21:35:07 +01:00
|
|
|
}
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:59:21 +01:00
|
|
|
void GSAIUtils::_bind_methods() {
|
|
|
|
ClassDB::bind_method(D_METHOD("clampedv3", "vector", "limit"), &GSAIUtils::bclampedv3);
|
|
|
|
ClassDB::bind_method(D_METHOD("vector3_to_angle", "vector"), &GSAIUtils::bvector3_to_angle);
|
|
|
|
ClassDB::bind_method(D_METHOD("vector2_to_angle", "vector"), &GSAIUtils::bvector2_to_angle);
|
|
|
|
ClassDB::bind_method(D_METHOD("angle_to_vector2", "angle"), &GSAIUtils::bangle_to_vector2);
|
|
|
|
ClassDB::bind_method(D_METHOD("to_vector2", "vector"), &GSAIUtils::bto_vector2);
|
|
|
|
ClassDB::bind_method(D_METHOD("to_vector3", "vector"), &GSAIUtils::bto_vector3);
|
2023-01-13 21:35:07 +01:00
|
|
|
}
|