From 8f380676a3615416d8cb839632e6d700b8026f4b Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 14 Jan 2023 14:34:08 +0100 Subject: [PATCH] Bind the enums in GSAIKinematicBody2DAgent and GSAIKinematicBody3DAgent. --- modules/steering_ai/agents/gsai_kinematic_body_2d_agent.cpp | 4 ++++ modules/steering_ai/agents/gsai_kinematic_body_2d_agent.h | 2 ++ modules/steering_ai/agents/gsai_kinematic_body_3d_agent.cpp | 4 ++++ modules/steering_ai/agents/gsai_kinematic_body_3d_agent.h | 2 ++ 4 files changed, 12 insertions(+) diff --git a/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.cpp b/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.cpp index 1a1dee1e3..372439669 100644 --- a/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.cpp +++ b/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.cpp @@ -219,4 +219,8 @@ void GSAIKinematicBody2DAgent::_bind_methods() { ClassDB::bind_method(D_METHOD("_physics_process_disconnect"), &GSAIKinematicBody2DAgent::_physics_process_disconnect); ClassDB::bind_method(D_METHOD("_on_SceneTree_physics_frame"), &GSAIKinematicBody2DAgent::_on_SceneTree_physics_frame); + + BIND_ENUM_CONSTANT(SLIDE); + BIND_ENUM_CONSTANT(COLLIDE); + BIND_ENUM_CONSTANT(POSITION); } diff --git a/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.h b/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.h index 2919dfa5a..75427dc6a 100644 --- a/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.h +++ b/modules/steering_ai/agents/gsai_kinematic_body_2d_agent.h @@ -46,4 +46,6 @@ protected: ObjectID _body_ref; }; +VARIANT_ENUM_CAST(GSAIKinematicBody2DAgent::MovementType); + #endif diff --git a/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.cpp b/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.cpp index 625d34518..5e4a854cf 100644 --- a/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.cpp +++ b/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.cpp @@ -209,4 +209,8 @@ void GSAIKinematicBody3DAgent::_bind_methods() { ClassDB::bind_method(D_METHOD("_physics_process_disconnect"), &GSAIKinematicBody3DAgent::_physics_process_disconnect); ClassDB::bind_method(D_METHOD("_on_SceneTree_physics_frame"), &GSAIKinematicBody3DAgent::_on_SceneTree_physics_frame); + + BIND_ENUM_CONSTANT(SLIDE); + BIND_ENUM_CONSTANT(COLLIDE); + BIND_ENUM_CONSTANT(POSITION); } diff --git a/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.h b/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.h index 40313ce38..1855f0090 100644 --- a/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.h +++ b/modules/steering_ai/agents/gsai_kinematic_body_3d_agent.h @@ -46,4 +46,6 @@ protected: ObjectID _body_ref; }; +VARIANT_ENUM_CAST(GSAIKinematicBody3DAgent::MovementType); + #endif