Пример #1
0
 private static extern bool TLN_SetTilemapTile(IntPtr tilemap, int row, int col, ref Tile tile);
Пример #2
0
 private static extern IntPtr TLN_CreateTilemap(int rows, int cols, Tile[] tiles);
Пример #3
0
 /// <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);
 }
Пример #4
0
 /// <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);
 }
Пример #5
0
 /// <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();
 }