private void OnDestroy() { if (isPolyNav == true) { _navMapRef.RemoveObstacle(_myObstacle); } }
static int RemoveObstacle(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); PolyNav2D obj = (PolyNav2D)ToLua.CheckObject <PolyNav2D>(L, 1); PolyNavObstacle arg0 = (PolyNavObstacle)ToLua.CheckObject <PolyNavObstacle>(L, 2); obj.RemoveObstacle(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// Called when companion used to "remove" the obstacle. /// </summary> private void OnDestroy() { _navMapRef.RemoveObstacle(_myObstacle); }