/// <summary> /// Create a new TCODPathFinding with a callback to determine cell information /// </summary> /// <param name="width">Map Width</param> /// <param name="height">Map Height</param> /// <param name="diagonalCost">Factor diagonal moves cost more</param> /// <param name="callback">Callback from path finder</param> public TCODPathFinding(int width, int height, double diagonalCost, TCODPathCallback callback) { m_callback = callback; m_internalCallback = new TCODPathCallbackInternal(this.TCODPathCallInternal); m_instance = TCOD_path_new_using_function(width, height, m_internalCallback, IntPtr.Zero, (float)diagonalCost); }
/// <summary> /// Create a new TCODDijkstraPathFinding with a callback to determine cell information /// </summary> /// <param name="width">Map Width</param> /// <param name="height">Map Height</param> /// <param name="diagonalCost">Factor diagonal moves cost more</param> /// <param name="callback">Callback from path finder</param> public TCODDijkstraPathFinding(int width, int height, double diagonalCost, TCODPathCallback callback) { m_callback = callback; m_internalCallback = new TCODPathCallbackInternal(this.TCODPathCallInternal); m_instance = TCOD_dijkstra_new_using_function(width, height, m_internalCallback, IntPtr.Zero, (float)diagonalCost); }