Initial commit

This commit is contained in:
Segey Lapin
2021-07-31 03:30:12 +03:00
commit 91cf9d2d34
249 changed files with 27582 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include "obstacle.h"
#include "detour.h"
DetourNavigationObstacle::DetourNavigationObstacle() :
mesh(0),
id(0),
radius(5.0f),
height(5.0f) {}
DetourNavigationObstacle::~DetourNavigationObstacle() {
if (mesh && id > 0)
mesh->remove_obstacle(id);
}
void DetourNavigationObstacle::_bind_methods()
{
ClassDB::bind_method(D_METHOD("get_radius"),
&DetourNavigationObstacle::get_radius);
ClassDB::bind_method(D_METHOD("set_radius", "radius"),
&DetourNavigationObstacle::set_radius);
ClassDB::bind_method(D_METHOD("get_height"),
&DetourNavigationObstacle::get_height);
ClassDB::bind_method(D_METHOD("set_height", "height"),
&DetourNavigationObstacle::set_height);
ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_NONE, ""), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_NONE, ""), "set_height", "get_height");
}