private static extern bool TLN_SetTilemapTile(IntPtr tilemap, int row, int col, ref Tile tile);
private static extern IntPtr TLN_CreateTilemap(int rows, int cols, Tile[] tiles);
/// <summary> /// /// </summary> /// <param name="row"></param> /// <param name="col"></param> /// <param name="tile"></param> /// <returns></returns> public bool GetTile(int row, int col, out Tile tile) { return TLN_GetTilemapTile(ptr, row, col, out tile); }
/// <summary> /// /// </summary> /// <param name="row"></param> /// <param name="col"></param> /// <param name="tile"></param> /// <returns></returns> public bool SetTile(int row, int col, ref Tile tile) { return TLN_SetTilemapTile(ptr, row, col, ref tile); }
/// <summary> /// /// </summary> /// <param name="rows"></param> /// <param name="cols"></param> /// <param name="tiles"></param> public Tilemap(int rows, int cols, Tile[] tiles) { IntPtr retval = TLN_CreateTilemap(rows, cols, tiles); if (retval != IntPtr.Zero) ptr = retval; else throw new CreationException(); }